diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 9cbd65b..83cd83c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -8,6 +8,7 @@ using OpenSim.Framework.Types; | |||
8 | using OpenSim.Framework.Communications.Caches; | 8 | using OpenSim.Framework.Communications.Caches; |
9 | using OpenSim.Framework.Data; | 9 | using OpenSim.Framework.Data; |
10 | using OpenSim.Framework.Utilities; | 10 | using OpenSim.Framework.Utilities; |
11 | using OpenSim.Physics.Manager; | ||
11 | 12 | ||
12 | namespace OpenSim.Region.Environment.Scenes | 13 | namespace OpenSim.Region.Environment.Scenes |
13 | { | 14 | { |
@@ -354,6 +355,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
354 | remoteClient.SendInventoryItemUpdate(item); | 355 | remoteClient.SendInventoryItemUpdate(item); |
355 | } | 356 | } |
356 | 357 | ||
358 | SceneObjectPart rootPart = ((SceneObjectGroup)selectedEnt).GetChildPart(((SceneObjectGroup)selectedEnt).UUID); | ||
359 | if (rootPart.PhysActor != null) | ||
360 | { | ||
361 | this.phyScene.RemovePrim(rootPart.PhysActor); | ||
362 | } | ||
363 | |||
357 | storageManager.DataStore.RemoveObject(((SceneObjectGroup)selectedEnt).UUID, m_regInfo.SimUUID); | 364 | storageManager.DataStore.RemoveObject(((SceneObjectGroup)selectedEnt).UUID, m_regInfo.SimUUID); |
358 | ((SceneObjectGroup)selectedEnt).DeleteGroup(); | 365 | ((SceneObjectGroup)selectedEnt).DeleteGroup(); |
359 | 366 | ||
@@ -361,6 +368,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
361 | { | 368 | { |
362 | Entities.Remove(((SceneObjectGroup)selectedEnt).UUID); | 369 | Entities.Remove(((SceneObjectGroup)selectedEnt).UUID); |
363 | } | 370 | } |
371 | ((SceneObjectGroup)selectedEnt).DeleteParts(); | ||
364 | } | 372 | } |
365 | } | 373 | } |
366 | } | 374 | } |
@@ -405,6 +413,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
405 | SceneObjectGroup group = new SceneObjectGroup(this, this.m_regionHandle, xmlData); | 413 | SceneObjectGroup group = new SceneObjectGroup(this, this.m_regionHandle, xmlData); |
406 | this.AddEntity(group); | 414 | this.AddEntity(group); |
407 | group.AbsolutePosition = pos; | 415 | group.AbsolutePosition = pos; |
416 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | ||
417 | rootPart.PhysActor = phyScene.AddPrim( | ||
418 | new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z), | ||
419 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | ||
420 | new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | ||
421 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); | ||
408 | } | 422 | } |
409 | 423 | ||
410 | 424 | ||