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/Region/Environment/Scenes/Primitive.cs | |
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 '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Primitive.cs | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs index 5cb2930..4bb43d2 100644 --- a/OpenSim/Region/Environment/Scenes/Primitive.cs +++ b/OpenSim/Region/Environment/Scenes/Primitive.cs | |||
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
130 | /// <param name="isRoot"></param> | 130 | /// <param name="isRoot"></param> |
131 | /// <param name="parent"></param> | 131 | /// <param name="parent"></param> |
132 | /// <param name="rootObject"></param> | 132 | /// <param name="rootObject"></param> |
133 | public Primitive(ulong regionHandle, Scene world, ObjectAddPacket addPacket, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, SceneObject rootObject) | 133 | public Primitive(ulong regionHandle, Scene world, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, SceneObject rootObject, PrimitiveBaseShape shape, LLVector3 pos) |
134 | { | 134 | { |
135 | m_regionHandle = regionHandle; | 135 | m_regionHandle = regionHandle; |
136 | m_world = world; | 136 | m_world = world; |
@@ -138,7 +138,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
138 | this.m_Parent = parent; | 138 | this.m_Parent = parent; |
139 | this.m_isRootPrim = isRoot; | 139 | this.m_isRootPrim = isRoot; |
140 | this.m_RootParent = rootObject; | 140 | this.m_RootParent = rootObject; |
141 | this.CreateFromPacket(addPacket, ownerID, localID); | 141 | |
142 | this.CreateFromPacket(ownerID, localID, pos, shape); | ||
142 | this.Rotation = Axiom.Math.Quaternion.Identity; | 143 | this.Rotation = Axiom.Math.Quaternion.Identity; |
143 | } | 144 | } |
144 | 145 | ||
@@ -209,43 +210,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
209 | /// <param name="addPacket"></param> | 210 | /// <param name="addPacket"></param> |
210 | /// <param name="ownerID"></param> | 211 | /// <param name="ownerID"></param> |
211 | /// <param name="localID"></param> | 212 | /// <param name="localID"></param> |
212 | public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID ownerID, uint localID) | 213 | public void CreateFromPacket(LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) |
213 | { | 214 | { |
214 | this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; | 215 | this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; |
215 | this.OwnerID = ownerID; | 216 | this.OwnerID = ownerID; |
216 | this.CreatorID = this.OwnerID; | 217 | this.CreatorID = this.OwnerID; |
217 | this.LastOwnerID = LLUUID.Zero; | 218 | this.LastOwnerID = LLUUID.Zero; |
218 | this.Pos = addPacket.ObjectData.RayEnd; | 219 | this.Pos = pos; |
219 | this.uuid = LLUUID.Random(); | 220 | this.uuid = LLUUID.Random(); |
220 | this.m_localId = (uint)(localID); | 221 | this.m_localId = (uint)(localID); |
221 | 222 | ||
222 | PrimitiveBaseShape pShape = new PrimitiveBaseShape(); | 223 | this.m_Shape = shape; |
223 | this.m_Shape = pShape; | ||
224 | |||
225 | pShape.PCode = addPacket.ObjectData.PCode; | ||
226 | pShape.PathBegin = addPacket.ObjectData.PathBegin; | ||
227 | pShape.PathEnd = addPacket.ObjectData.PathEnd; | ||
228 | pShape.PathScaleX = addPacket.ObjectData.PathScaleX; | ||
229 | pShape.PathScaleY = addPacket.ObjectData.PathScaleY; | ||
230 | pShape.PathShearX = addPacket.ObjectData.PathShearX; | ||
231 | pShape.PathShearY = addPacket.ObjectData.PathShearY; | ||
232 | pShape.PathSkew = addPacket.ObjectData.PathSkew; | ||
233 | pShape.ProfileBegin = addPacket.ObjectData.ProfileBegin; | ||
234 | pShape.ProfileEnd = addPacket.ObjectData.ProfileEnd; | ||
235 | pShape.Scale = addPacket.ObjectData.Scale; | ||
236 | pShape.PathCurve = addPacket.ObjectData.PathCurve; | ||
237 | pShape.ProfileCurve = addPacket.ObjectData.ProfileCurve; | ||
238 | pShape.ProfileHollow = addPacket.ObjectData.ProfileHollow; | ||
239 | pShape.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset; | ||
240 | pShape.PathRevolutions = addPacket.ObjectData.PathRevolutions; | ||
241 | pShape.PathTaperX = addPacket.ObjectData.PathTaperX; | ||
242 | pShape.PathTaperY = addPacket.ObjectData.PathTaperY; | ||
243 | pShape.PathTwist = addPacket.ObjectData.PathTwist; | ||
244 | pShape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; | ||
245 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); | ||
246 | pShape.TextureEntry = ntex.ToBytes(); | ||
247 | this.updateFlag = 1; | 224 | this.updateFlag = 1; |
248 | } | 225 | } |
226 | |||
249 | #endregion | 227 | #endregion |
250 | 228 | ||
251 | #region Linking / unlinking | 229 | #region Linking / unlinking |