diff options
author | lbsa71 | 2007-07-13 12:32:34 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-13 12:32:34 +0000 |
commit | 33ef93f4a6ed66dcd06733b3909e647b33faa698 (patch) | |
tree | d161a1fe96353ea4077b62f12aa453a7ebd77d9e /OpenSim/Framework/General | |
parent | * OGS project is now back down to zero warnings. (diff) | |
download | opensim-SC_OLD-33ef93f4a6ed66dcd06733b3909e647b33faa698.zip opensim-SC_OLD-33ef93f4a6ed66dcd06733b3909e647b33faa698.tar.gz opensim-SC_OLD-33ef93f4a6ed66dcd06733b3909e647b33faa698.tar.bz2 opensim-SC_OLD-33ef93f4a6ed66dcd06733b3909e647b33faa698.tar.xz |
* ObjectAddPacket now confined to ClientView,´using PrimitiveBaseShape instead - w00t!
Diffstat (limited to 'OpenSim/Framework/General')
-rw-r--r-- | OpenSim/Framework/General/Interfaces/IClientAPI.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | 31 |
2 files changed, 32 insertions, 2 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index b6f304b..9ac7994 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs | |||
@@ -75,6 +75,7 @@ namespace OpenSim.Framework.Interfaces | |||
75 | 75 | ||
76 | public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); | 76 | public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); |
77 | 77 | ||
78 | public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape); | ||
78 | 79 | ||
79 | public interface IClientAPI | 80 | public interface IClientAPI |
80 | { | 81 | { |
@@ -94,7 +95,7 @@ namespace OpenSim.Framework.Interfaces | |||
94 | event GenericCall2 OnCompleteMovementToRegion; | 95 | event GenericCall2 OnCompleteMovementToRegion; |
95 | event UpdateAgent OnAgentUpdate; | 96 | event UpdateAgent OnAgentUpdate; |
96 | event GenericCall OnRequestAvatarsData; | 97 | event GenericCall OnRequestAvatarsData; |
97 | event GenericCall4 OnAddPrim; | 98 | event AddNewPrim OnAddPrim; |
98 | event ObjectDuplicate OnObjectDuplicate; | 99 | event ObjectDuplicate OnObjectDuplicate; |
99 | event UpdateVector OnGrapObject; | 100 | event UpdateVector OnGrapObject; |
100 | event ObjectSelect OnDeGrapObject; | 101 | event ObjectSelect OnDeGrapObject; |
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs index a6671d1..b9a8c90 100644 --- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | |||
@@ -1,4 +1,5 @@ | |||
1 | using libsecondlife; | 1 | using libsecondlife; |
2 | using libsecondlife.Packets; | ||
2 | 3 | ||
3 | namespace OpenSim.Framework.Types | 4 | namespace OpenSim.Framework.Types |
4 | { | 5 | { |
@@ -97,6 +98,34 @@ namespace OpenSim.Framework.Types | |||
97 | 98 | ||
98 | return primShape; | 99 | return primShape; |
99 | } | 100 | } |
100 | } | ||
101 | 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 | } | ||
102 | } | 131 | } |