diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 36 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 54 |
2 files changed, 43 insertions, 47 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 610bfd1..fb0ec29 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -673,6 +673,8 @@ namespace OpenSim.Region.ClientStack | |||
673 | OutPacket(loadURL); | 673 | OutPacket(loadURL); |
674 | } | 674 | } |
675 | 675 | ||
676 | #endregion | ||
677 | |||
676 | #region Appearance/ Wearables Methods | 678 | #region Appearance/ Wearables Methods |
677 | 679 | ||
678 | /// <summary> | 680 | /// <summary> |
@@ -817,44 +819,33 @@ namespace OpenSim.Region.ClientStack | |||
817 | this.OutPacket(attach); | 819 | this.OutPacket(attach); |
818 | } | 820 | } |
819 | 821 | ||
820 | public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID, byte[] particleSystem) | 822 | public void SendPrimitiveToClient( |
823 | ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, | ||
824 | LLUUID objectID, LLUUID ownerID, string text, uint parentID, byte[] particleSystem, LLQuaternion rotation) | ||
821 | { | 825 | { |
822 | ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); | 826 | ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); |
823 | outPacket.RegionData.RegionHandle = regionHandle; | 827 | outPacket.RegionData.RegionHandle = regionHandle; |
824 | outPacket.RegionData.TimeDilation = timeDilation; | 828 | outPacket.RegionData.TimeDilation = timeDilation; |
825 | outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | 829 | outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; |
830 | |||
826 | outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primShape, flags); | 831 | outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primShape, flags); |
832 | |||
827 | outPacket.ObjectData[0].ID = localID; | 833 | outPacket.ObjectData[0].ID = localID; |
828 | outPacket.ObjectData[0].FullID = objectID; | 834 | outPacket.ObjectData[0].FullID = objectID; |
829 | outPacket.ObjectData[0].OwnerID = ownerID; | 835 | outPacket.ObjectData[0].OwnerID = ownerID; |
830 | outPacket.ObjectData[0].Text = Helpers.StringToField( text ); | 836 | outPacket.ObjectData[0].Text = Helpers.StringToField( text ); |
831 | outPacket.ObjectData[0].ParentID = parentID; | 837 | outPacket.ObjectData[0].ParentID = parentID; |
832 | outPacket.ObjectData[0].PSBlock = particleSystem; | 838 | outPacket.ObjectData[0].PSBlock = particleSystem; |
839 | |||
833 | byte[] pb = pos.GetBytes(); | 840 | byte[] pb = pos.GetBytes(); |
834 | Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); | 841 | Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); |
842 | |||
835 | byte[] rot = rotation.GetBytes(); | 843 | byte[] rot = rotation.GetBytes(); |
836 | Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 36, rot.Length); | 844 | Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 36, rot.Length); |
845 | |||
837 | OutPacket(outPacket); | 846 | OutPacket(outPacket); |
838 | } | 847 | } |
839 | 848 | ||
840 | public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID, byte[] particleSystem) | ||
841 | { | ||
842 | ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); | ||
843 | outPacket.RegionData.RegionHandle = regionHandle; | ||
844 | outPacket.RegionData.TimeDilation = timeDilation; | ||
845 | outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | ||
846 | outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primShape, flags); | ||
847 | outPacket.ObjectData[0].ID = localID; | ||
848 | outPacket.ObjectData[0].FullID = objectID; | ||
849 | outPacket.ObjectData[0].OwnerID = ownerID; | ||
850 | outPacket.ObjectData[0].Text = Helpers.StringToField( text ); | ||
851 | outPacket.ObjectData[0].ParentID = parentID; | ||
852 | outPacket.ObjectData[0].PSBlock = particleSystem; | ||
853 | byte[] pb = pos.GetBytes(); | ||
854 | Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); | ||
855 | |||
856 | OutPacket(outPacket); | ||
857 | } | ||
858 | /// <summary> | 849 | /// <summary> |
859 | /// | 850 | /// |
860 | /// </summary> | 851 | /// </summary> |
@@ -876,8 +867,6 @@ namespace OpenSim.Region.ClientStack | |||
876 | 867 | ||
877 | #endregion | 868 | #endregion |
878 | 869 | ||
879 | #endregion | ||
880 | |||
881 | #region Helper Methods | 870 | #region Helper Methods |
882 | 871 | ||
883 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateAvatarImprovedBlock(uint localID, LLVector3 pos, LLVector3 velocity) | 872 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateAvatarImprovedBlock(uint localID, LLVector3 pos, LLVector3 velocity) |
@@ -1163,8 +1152,6 @@ namespace OpenSim.Region.ClientStack | |||
1163 | objdata.ObjectData[64] = 189; | 1152 | objdata.ObjectData[64] = 189; |
1164 | } | 1153 | } |
1165 | 1154 | ||
1166 | #endregion | ||
1167 | |||
1168 | public void SendNameReply(LLUUID profileId, string firstname, string lastname) | 1155 | public void SendNameReply(LLUUID profileId, string firstname, string lastname) |
1169 | { | 1156 | { |
1170 | UUIDNameReplyPacket packet = new UUIDNameReplyPacket(); | 1157 | UUIDNameReplyPacket packet = new UUIDNameReplyPacket(); |
@@ -1177,5 +1164,8 @@ namespace OpenSim.Region.ClientStack | |||
1177 | 1164 | ||
1178 | OutPacket( packet ); | 1165 | OutPacket( packet ); |
1179 | } | 1166 | } |
1167 | |||
1168 | #endregion | ||
1169 | |||
1180 | } | 1170 | } |
1181 | } | 1171 | } |
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index c0c14ee..5ad35ff 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -218,30 +218,7 @@ namespace OpenSim.Region.ClientStack | |||
218 | if (OnAddPrim != null) | 218 | if (OnAddPrim != null) |
219 | { | 219 | { |
220 | ObjectAddPacket addPacket = (ObjectAddPacket) Pack ; | 220 | ObjectAddPacket addPacket = (ObjectAddPacket) Pack ; |
221 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); | 221 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); |
222 | |||
223 | shape.PCode = addPacket.ObjectData.PCode; | ||
224 | shape.PathBegin = addPacket.ObjectData.PathBegin; | ||
225 | shape.PathEnd = addPacket.ObjectData.PathEnd; | ||
226 | shape.PathScaleX = addPacket.ObjectData.PathScaleX; | ||
227 | shape.PathScaleY = addPacket.ObjectData.PathScaleY; | ||
228 | shape.PathShearX = addPacket.ObjectData.PathShearX; | ||
229 | shape.PathShearY = addPacket.ObjectData.PathShearY; | ||
230 | shape.PathSkew = addPacket.ObjectData.PathSkew; | ||
231 | shape.ProfileBegin = addPacket.ObjectData.ProfileBegin; | ||
232 | shape.ProfileEnd = addPacket.ObjectData.ProfileEnd; | ||
233 | shape.Scale = addPacket.ObjectData.Scale; | ||
234 | shape.PathCurve = addPacket.ObjectData.PathCurve; | ||
235 | shape.ProfileCurve = addPacket.ObjectData.ProfileCurve; | ||
236 | shape.ProfileHollow = addPacket.ObjectData.ProfileHollow; | ||
237 | shape.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset; | ||
238 | shape.PathRevolutions = addPacket.ObjectData.PathRevolutions; | ||
239 | shape.PathTaperX = addPacket.ObjectData.PathTaperX; | ||
240 | shape.PathTaperY = addPacket.ObjectData.PathTaperY; | ||
241 | shape.PathTwist = addPacket.ObjectData.PathTwist; | ||
242 | shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; | ||
243 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); | ||
244 | shape.TextureEntry = ntex.ToBytes(); | ||
245 | 222 | ||
246 | OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape); | 223 | OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape); |
247 | } | 224 | } |
@@ -624,5 +601,34 @@ namespace OpenSim.Region.ClientStack | |||
624 | } | 601 | } |
625 | } | 602 | } |
626 | } | 603 | } |
604 | |||
605 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) | ||
606 | { | ||
607 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); | ||
608 | |||
609 | shape.PCode = addPacket.ObjectData.PCode; | ||
610 | shape.PathBegin = addPacket.ObjectData.PathBegin; | ||
611 | shape.PathEnd = addPacket.ObjectData.PathEnd; | ||
612 | shape.PathScaleX = addPacket.ObjectData.PathScaleX; | ||
613 | shape.PathScaleY = addPacket.ObjectData.PathScaleY; | ||
614 | shape.PathShearX = addPacket.ObjectData.PathShearX; | ||
615 | shape.PathShearY = addPacket.ObjectData.PathShearY; | ||
616 | shape.PathSkew = addPacket.ObjectData.PathSkew; | ||
617 | shape.ProfileBegin = addPacket.ObjectData.ProfileBegin; | ||
618 | shape.ProfileEnd = addPacket.ObjectData.ProfileEnd; | ||
619 | shape.Scale = addPacket.ObjectData.Scale; | ||
620 | shape.PathCurve = addPacket.ObjectData.PathCurve; | ||
621 | shape.ProfileCurve = addPacket.ObjectData.ProfileCurve; | ||
622 | shape.ProfileHollow = addPacket.ObjectData.ProfileHollow; | ||
623 | shape.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset; | ||
624 | shape.PathRevolutions = addPacket.ObjectData.PathRevolutions; | ||
625 | shape.PathTaperX = addPacket.ObjectData.PathTaperX; | ||
626 | shape.PathTaperY = addPacket.ObjectData.PathTaperY; | ||
627 | shape.PathTwist = addPacket.ObjectData.PathTwist; | ||
628 | shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; | ||
629 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); | ||
630 | shape.TextureEntry = ntex.ToBytes(); | ||
631 | return shape; | ||
632 | } | ||
627 | } | 633 | } |
628 | } | 634 | } |