aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs9
3 files changed, 21 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index e37ad59..8da22c4 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -568,12 +568,12 @@ namespace OpenSim.Region.Environment.Scenes
568 /// </summary> 568 /// </summary>
569 /// <param name="addPacket"></param> 569 /// <param name="addPacket"></param>
570 /// <param name="ownerID"></param> 570 /// <param name="ownerID"></param>
571 public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape) 571 public void AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape)
572 { 572 {
573 if (PermissionsMngr.CanRezObject(ownerID, pos)) 573 if (PermissionsMngr.CanRezObject(ownerID, pos))
574 { 574 {
575 SceneObjectGroup sceneOb = 575 SceneObjectGroup sceneOb =
576 new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, shape); 576 new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);
577 AddEntity(sceneOb); 577 AddEntity(sceneOb);
578 SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); 578 SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
579 // if grass or tree, make phantom 579 // if grass or tree, make phantom
@@ -1565,4 +1565,4 @@ namespace OpenSim.Region.Environment.Scenes
1565 } 1565 }
1566 } 1566 }
1567 } 1567 }
1568} \ No newline at end of file 1568}
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 2f86d2f..aaa25e7 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Scenes
322 /// 322 ///
323 /// </summary> 323 /// </summary>
324 public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, 324 public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos,
325 PrimitiveBaseShape shape) 325 LLQuaternion rot, PrimitiveBaseShape shape)
326 { 326 {
327 m_regionHandle = regionHandle; 327 m_regionHandle = regionHandle;
328 m_scene = scene; 328 m_scene = scene;
@@ -330,13 +330,21 @@ namespace OpenSim.Region.Environment.Scenes
330 // this.Pos = pos; 330 // this.Pos = pos;
331 LLVector3 rootOffset = new LLVector3(0, 0, 0); 331 LLVector3 rootOffset = new LLVector3(0, 0, 0);
332 SceneObjectPart newPart = 332 SceneObjectPart newPart =
333 new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rootOffset); 333 new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rot, rootOffset);
334 m_parts.Add(newPart.UUID, newPart); 334 m_parts.Add(newPart.UUID, newPart);
335 SetPartAsRoot(newPart); 335 SetPartAsRoot(newPart);
336 336
337 AttachToBackup(); 337 AttachToBackup();
338 } 338 }
339 339
340 /// <summary>
341 ///
342 /// </summary>
343 public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos,
344 PrimitiveBaseShape shape):this(scene, regionHandle, ownerID, localID, pos, LLQuaternion.Identity, shape)
345 {
346 }
347
340 #endregion 348 #endregion
341 349
342 public string ToXmlString() 350 public string ToXmlString()
@@ -1386,4 +1394,4 @@ namespace OpenSim.Region.Environment.Scenes
1386 Text = text; 1394 Text = text;
1387 } 1395 }
1388 } 1396 }
1389} \ No newline at end of file 1397}
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 80723fa..dacac4b 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -271,6 +271,11 @@ namespace OpenSim.Region.Environment.Scenes
271 { 271 {
272 } 272 }
273 273
274 public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
275 PrimitiveBaseShape shape, LLVector3 groupPosition, LLVector3 offsetPosition):this(regionHandle, parent, ownerID, localID, shape, groupPosition, LLQuaternion.Identity, offsetPosition)
276 {
277 }
278
274 /// <summary> 279 /// <summary>
275 /// Create a completely new SceneObjectPart (prim) 280 /// Create a completely new SceneObjectPart (prim)
276 /// </summary> 281 /// </summary>
@@ -281,7 +286,7 @@ namespace OpenSim.Region.Environment.Scenes
281 /// <param name="shape"></param> 286 /// <param name="shape"></param>
282 /// <param name="position"></param> 287 /// <param name="position"></param>
283 public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, 288 public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
284 PrimitiveBaseShape shape, LLVector3 groupPosition, LLVector3 offsetPosition) 289 PrimitiveBaseShape shape, LLVector3 groupPosition, LLQuaternion rotationOffset, LLVector3 offsetPosition)
285 { 290 {
286 m_name = "Primitive"; 291 m_name = "Primitive";
287 m_regionHandle = regionHandle; 292 m_regionHandle = regionHandle;
@@ -297,7 +302,7 @@ namespace OpenSim.Region.Environment.Scenes
297 302
298 GroupPosition = groupPosition; 303 GroupPosition = groupPosition;
299 OffsetPosition = offsetPosition; 304 OffsetPosition = offsetPosition;
300 RotationOffset = LLQuaternion.Identity; 305 RotationOffset = rotationOffset;
301 Velocity = new LLVector3(0, 0, 0); 306 Velocity = new LLVector3(0, 0, 0);
302 AngularVelocity = new LLVector3(0, 0, 0); 307 AngularVelocity = new LLVector3(0, 0, 0);
303 Acceleration = new LLVector3(0, 0, 0); 308 Acceleration = new LLVector3(0, 0, 0);