From 581ea0d92efd5bf3e999078f654373167ac7dffc Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Fri, 13 Jul 2007 12:44:50 +0000 Subject: inlined packet deserialization --- .../ClientStack/ClientView.ProcessPackets.cs | 36 ++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') 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 case PacketType.ObjectAdd: if (OnAddPrim != null) { - ObjectAddPacket packet = (ObjectAddPacket) Pack ; - PrimitiveBaseShape primShape = PrimitiveBaseShape.FromAddPacket( packet ); + ObjectAddPacket addPacket = (ObjectAddPacket) Pack ; - OnAddPrim(this.AgentId, packet.ObjectData.RayEnd, primShape ); + PrimitiveBaseShape shape = new PrimitiveBaseShape(); + + shape.PCode = addPacket.ObjectData.PCode; + shape.PathBegin = addPacket.ObjectData.PathBegin; + shape.PathEnd = addPacket.ObjectData.PathEnd; + shape.PathScaleX = addPacket.ObjectData.PathScaleX; + shape.PathScaleY = addPacket.ObjectData.PathScaleY; + shape.PathShearX = addPacket.ObjectData.PathShearX; + shape.PathShearY = addPacket.ObjectData.PathShearY; + shape.PathSkew = addPacket.ObjectData.PathSkew; + shape.ProfileBegin = addPacket.ObjectData.ProfileBegin; + shape.ProfileEnd = addPacket.ObjectData.ProfileEnd; + shape.Scale = addPacket.ObjectData.Scale; + shape.PathCurve = addPacket.ObjectData.PathCurve; + shape.ProfileCurve = addPacket.ObjectData.ProfileCurve; + shape.ProfileHollow = addPacket.ObjectData.ProfileHollow; + shape.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset; + shape.PathRevolutions = addPacket.ObjectData.PathRevolutions; + shape.PathTaperX = addPacket.ObjectData.PathTaperX; + shape.PathTaperY = addPacket.ObjectData.PathTaperY; + shape.PathTwist = addPacket.ObjectData.PathTwist; + shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; + LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); + shape.TextureEntry = ntex.ToBytes(); + + OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape); } break; case PacketType.ObjectShape: - ObjectShapePacket shape = (ObjectShapePacket)Pack; - for (int i = 0; i < shape.ObjectData.Length; i++) + ObjectShapePacket shapePacket = (ObjectShapePacket)Pack; + for (int i = 0; i < shapePacket.ObjectData.Length; i++) { if (OnUpdatePrimShape != null) { - OnUpdatePrimShape(shape.ObjectData[i].ObjectLocalID, shape.ObjectData[i]); + OnUpdatePrimShape(shapePacket.ObjectData[i].ObjectLocalID, shapePacket.ObjectData[i]); } } break; -- cgit v1.1