aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorMW2007-07-03 20:10:20 +0000
committerMW2007-07-03 20:10:20 +0000
commitbd8018fa1cb32aa42e2a1a41ebb01fc0f1b0a04b (patch)
treec2b75501b3947186c462d71b49ca89e7c9378ac6 /OpenSim/Region/ClientStack
parent*Fixed storage issue as noted in last commit of the OGS1 GridServer (diff)
downloadopensim-SC_OLD-bd8018fa1cb32aa42e2a1a41ebb01fc0f1b0a04b.zip
opensim-SC_OLD-bd8018fa1cb32aa42e2a1a41ebb01fc0f1b0a04b.tar.gz
opensim-SC_OLD-bd8018fa1cb32aa42e2a1a41ebb01fc0f1b0a04b.tar.bz2
opensim-SC_OLD-bd8018fa1cb32aa42e2a1a41ebb01fc0f1b0a04b.tar.xz
Today's work on Building support/tools. Think I am slowly getting there.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs3
-rw-r--r--OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs79
2 files changed, 78 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 40e0021..6de6af6 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -64,6 +64,7 @@ namespace OpenSim.Region.ClientStack
64 public event UpdatePrimTexture OnUpdatePrimTexture; 64 public event UpdatePrimTexture OnUpdatePrimTexture;
65 public event UpdateVector OnUpdatePrimPosition; 65 public event UpdateVector OnUpdatePrimPosition;
66 public event UpdatePrimRotation OnUpdatePrimRotation; 66 public event UpdatePrimRotation OnUpdatePrimRotation;
67 public event UpdatePrimGroupRotation OnUpdatePrimGroupRotation;
67 public event UpdateVector OnUpdatePrimScale; 68 public event UpdateVector OnUpdatePrimScale;
68 public event StatusChange OnChildAgentStatus; 69 public event StatusChange OnChildAgentStatus;
69 public event GenericCall2 OnStopMovement; 70 public event GenericCall2 OnStopMovement;
@@ -644,7 +645,7 @@ namespace OpenSim.Region.ClientStack
644 byte[] pb = pos.GetBytes(); 645 byte[] pb = pos.GetBytes();
645 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); 646 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
646 byte[] rot = rotation.GetBytes(); 647 byte[] rot = rotation.GetBytes();
647 Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 48, rot.Length); 648 Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 36, rot.Length);
648 OutPacket(outPacket); 649 OutPacket(outPacket);
649 } 650 }
650 651
diff --git a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
index e4512d1..0b6c4f6 100644
--- a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
+++ b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
@@ -101,8 +101,10 @@ namespace OpenSim.Region.ClientStack
101 protected bool MultipleObjUpdate(ClientView simClient, Packet packet) 101 protected bool MultipleObjUpdate(ClientView simClient, Packet packet)
102 { 102 {
103 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; 103 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet;
104 // Console.WriteLine("new multi update packet " + multipleupdate.ToString());
104 for (int i = 0; i < multipleupdate.ObjectData.Length; i++) 105 for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
105 { 106 {
107 #region position
106 if (multipleupdate.ObjectData[i].Type == 9) //change position 108 if (multipleupdate.ObjectData[i].Type == 9) //change position
107 { 109 {
108 if (OnUpdatePrimPosition != null) 110 if (OnUpdatePrimPosition != null)
@@ -110,24 +112,95 @@ namespace OpenSim.Region.ClientStack
110 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 112 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
111 OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 113 OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
112 } 114 }
113 //should update stored position of the prim 115
116 }
117 else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
118 {
119 if (OnUpdatePrimPosition != null)
120 {
121 // libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
122 //OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
123 }
114 } 124 }
115 else if (multipleupdate.ObjectData[i].Type == 10)//rotation 125 #endregion position
126 #region rotation
127 else if (multipleupdate.ObjectData[i].Type == 2)// single item of group rotation from tab
116 { 128 {
117 if (OnUpdatePrimRotation != null) 129 if (OnUpdatePrimRotation != null)
118 { 130 {
119 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); 131 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
132 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
133 OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
134 }
135 }
136 else if (multipleupdate.ObjectData[i].Type == 3)// single item of group rotation from mouse
137 {
138 if (OnUpdatePrimRotation != null)
139 {
140 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
141 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
142 OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
143 }
144 }
145 else if (multipleupdate.ObjectData[i].Type == 10)//group rotation from object tab
146 {
147 if (OnUpdatePrimRotation != null)
148 {
149 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
150 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
120 OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 151 OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
121 } 152 }
122 } 153 }
123 else if (multipleupdate.ObjectData[i].Type == 13)//scale 154 else if (multipleupdate.ObjectData[i].Type == 11)//group rotation from mouse
155 {
156 if (OnUpdatePrimGroupRotation != null)
157 {
158 libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
159 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
160 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
161 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
162 OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this);
163 }
164 }
165 #endregion
166 #region scale
167 else if (multipleupdate.ObjectData[i].Type == 13)//group scale from object tab
124 { 168 {
125 if (OnUpdatePrimScale != null) 169 if (OnUpdatePrimScale != null)
126 { 170 {
127 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 171 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
172 //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
173 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
174 }
175 }
176 else if (multipleupdate.ObjectData[i].Type == 29)//group scale from mouse
177 {
178 if (OnUpdatePrimScale != null)
179 {
180 libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
181 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z );
182 // OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
183 }
184 }
185 else if (multipleupdate.ObjectData[i].Type == 5)//single scale from object tab
186 {
187 if (OnUpdatePrimScale != null)
188 {
189 libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
190 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
191 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
192 }
193 }
194 else if (multipleupdate.ObjectData[i].Type == 21)//single scale from mouse
195 {
196 if (OnUpdatePrimScale != null)
197 {
198 libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
199 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
128 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 200 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
129 } 201 }
130 } 202 }
203 #endregion
131 } 204 }
132 return true; 205 return true;
133 } 206 }