aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs79
1 files changed, 76 insertions, 3 deletions
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 }