aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorlbsa712007-07-13 12:44:50 +0000
committerlbsa712007-07-13 12:44:50 +0000
commit581ea0d92efd5bf3e999078f654373167ac7dffc (patch)
tree9e952e3fed9503957287c546bb0b4031f7517294 /OpenSim
parent* ObjectAddPacket now confined to ClientView,´using PrimitiveBaseShape inste... (diff)
downloadopensim-SC-581ea0d92efd5bf3e999078f654373167ac7dffc.zip
opensim-SC-581ea0d92efd5bf3e999078f654373167ac7dffc.tar.gz
opensim-SC-581ea0d92efd5bf3e999078f654373167ac7dffc.tar.bz2
opensim-SC-581ea0d92efd5bf3e999078f654373167ac7dffc.tar.xz
inlined packet deserialization
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs29
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs36
2 files changed, 30 insertions, 35 deletions
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
index b9a8c90..886c00d 100644
--- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
@@ -98,34 +98,5 @@ namespace OpenSim.Framework.Types
98 98
99 return primShape; 99 return primShape;
100 } 100 }
101
102 public static PrimitiveBaseShape FromAddPacket(ObjectAddPacket addPacket)
103 {
104 PrimitiveBaseShape pShape = new PrimitiveBaseShape();
105
106 pShape.PCode = addPacket.ObjectData.PCode;
107 pShape.PathBegin = addPacket.ObjectData.PathBegin;
108 pShape.PathEnd = addPacket.ObjectData.PathEnd;
109 pShape.PathScaleX = addPacket.ObjectData.PathScaleX;
110 pShape.PathScaleY = addPacket.ObjectData.PathScaleY;
111 pShape.PathShearX = addPacket.ObjectData.PathShearX;
112 pShape.PathShearY = addPacket.ObjectData.PathShearY;
113 pShape.PathSkew = addPacket.ObjectData.PathSkew;
114 pShape.ProfileBegin = addPacket.ObjectData.ProfileBegin;
115 pShape.ProfileEnd = addPacket.ObjectData.ProfileEnd;
116 pShape.Scale = addPacket.ObjectData.Scale;
117 pShape.PathCurve = addPacket.ObjectData.PathCurve;
118 pShape.ProfileCurve = addPacket.ObjectData.ProfileCurve;
119 pShape.ProfileHollow = addPacket.ObjectData.ProfileHollow;
120 pShape.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset;
121 pShape.PathRevolutions = addPacket.ObjectData.PathRevolutions;
122 pShape.PathTaperX = addPacket.ObjectData.PathTaperX;
123 pShape.PathTaperY = addPacket.ObjectData.PathTaperY;
124 pShape.PathTwist = addPacket.ObjectData.PathTwist;
125 pShape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
126 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
127 pShape.TextureEntry = ntex.ToBytes();
128 return pShape;
129 }
130 } 101 }
131} 102}
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index 013b755..169f2c4 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -217,19 +217,43 @@ namespace OpenSim.Region.ClientStack
217 case PacketType.ObjectAdd: 217 case PacketType.ObjectAdd:
218 if (OnAddPrim != null) 218 if (OnAddPrim != null)
219 { 219 {
220 ObjectAddPacket packet = (ObjectAddPacket) Pack ; 220 ObjectAddPacket addPacket = (ObjectAddPacket) Pack ;
221 PrimitiveBaseShape primShape = PrimitiveBaseShape.FromAddPacket( packet );
222 221
223 OnAddPrim(this.AgentId, packet.ObjectData.RayEnd, primShape ); 222 PrimitiveBaseShape shape = new PrimitiveBaseShape();
223
224 shape.PCode = addPacket.ObjectData.PCode;
225 shape.PathBegin = addPacket.ObjectData.PathBegin;
226 shape.PathEnd = addPacket.ObjectData.PathEnd;
227 shape.PathScaleX = addPacket.ObjectData.PathScaleX;
228 shape.PathScaleY = addPacket.ObjectData.PathScaleY;
229 shape.PathShearX = addPacket.ObjectData.PathShearX;
230 shape.PathShearY = addPacket.ObjectData.PathShearY;
231 shape.PathSkew = addPacket.ObjectData.PathSkew;
232 shape.ProfileBegin = addPacket.ObjectData.ProfileBegin;
233 shape.ProfileEnd = addPacket.ObjectData.ProfileEnd;
234 shape.Scale = addPacket.ObjectData.Scale;
235 shape.PathCurve = addPacket.ObjectData.PathCurve;
236 shape.ProfileCurve = addPacket.ObjectData.ProfileCurve;
237 shape.ProfileHollow = addPacket.ObjectData.ProfileHollow;
238 shape.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset;
239 shape.PathRevolutions = addPacket.ObjectData.PathRevolutions;
240 shape.PathTaperX = addPacket.ObjectData.PathTaperX;
241 shape.PathTaperY = addPacket.ObjectData.PathTaperY;
242 shape.PathTwist = addPacket.ObjectData.PathTwist;
243 shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
244 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
245 shape.TextureEntry = ntex.ToBytes();
246
247 OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape);
224 } 248 }
225 break; 249 break;
226 case PacketType.ObjectShape: 250 case PacketType.ObjectShape:
227 ObjectShapePacket shape = (ObjectShapePacket)Pack; 251 ObjectShapePacket shapePacket = (ObjectShapePacket)Pack;
228 for (int i = 0; i < shape.ObjectData.Length; i++) 252 for (int i = 0; i < shapePacket.ObjectData.Length; i++)
229 { 253 {
230 if (OnUpdatePrimShape != null) 254 if (OnUpdatePrimShape != null)
231 { 255 {
232 OnUpdatePrimShape(shape.ObjectData[i].ObjectLocalID, shape.ObjectData[i]); 256 OnUpdatePrimShape(shapePacket.ObjectData[i].ObjectLocalID, shapePacket.ObjectData[i]);
233 } 257 }
234 } 258 }
235 break; 259 break;