diff options
author | Justin Clark-Casey (justincc) | 2011-08-05 23:42:05 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-05 23:42:05 +0100 |
commit | ba89fc3aa1833c0fd6b5518d85ca966768597c6c (patch) | |
tree | 2713dcb4797e690e6edc21decfc6213d11b19230 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | Get "show region" command in GridService to show grid co-ordinates rather tha... (diff) | |
download | opensim-SC-ba89fc3aa1833c0fd6b5518d85ca966768597c6c.zip opensim-SC-ba89fc3aa1833c0fd6b5518d85ca966768597c6c.tar.gz opensim-SC-ba89fc3aa1833c0fd6b5518d85ca966768597c6c.tar.bz2 opensim-SC-ba89fc3aa1833c0fd6b5518d85ca966768597c6c.tar.xz |
Add regression test for setting phantom status on a scene object. This is not yet complete.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 57baa99..3b6a458 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2253,7 +2253,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2253 | /// <param name="objectGroup"></param> | 2253 | /// <param name="objectGroup"></param> |
2254 | public virtual void DetachFromBackup() | 2254 | public virtual void DetachFromBackup() |
2255 | { | 2255 | { |
2256 | if (m_isBackedUp) | 2256 | if (m_isBackedUp && Scene != null) |
2257 | m_scene.EventManager.OnBackup -= ProcessBackup; | 2257 | m_scene.EventManager.OnBackup -= ProcessBackup; |
2258 | 2258 | ||
2259 | m_isBackedUp = false; | 2259 | m_isBackedUp = false; |
@@ -2520,7 +2520,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2520 | { | 2520 | { |
2521 | SceneObjectPart selectionPart = GetChildPart(localID); | 2521 | SceneObjectPart selectionPart = GetChildPart(localID); |
2522 | 2522 | ||
2523 | if (SetTemporary) | 2523 | if (SetTemporary && Scene != null) |
2524 | { | 2524 | { |
2525 | DetachFromBackup(); | 2525 | DetachFromBackup(); |
2526 | // Remove from database and parcel prim count | 2526 | // Remove from database and parcel prim count |
@@ -2532,15 +2532,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
2532 | if (selectionPart != null) | 2532 | if (selectionPart != null) |
2533 | { | 2533 | { |
2534 | SceneObjectPart[] parts = m_parts.GetArray(); | 2534 | SceneObjectPart[] parts = m_parts.GetArray(); |
2535 | for (int i = 0; i < parts.Length; i++) | 2535 | |
2536 | if (Scene != null) | ||
2536 | { | 2537 | { |
2537 | SceneObjectPart part = parts[i]; | 2538 | for (int i = 0; i < parts.Length; i++) |
2538 | if (part.Scale.X > m_scene.RegionInfo.PhysPrimMax || | ||
2539 | part.Scale.Y > m_scene.RegionInfo.PhysPrimMax || | ||
2540 | part.Scale.Z > m_scene.RegionInfo.PhysPrimMax) | ||
2541 | { | 2539 | { |
2542 | UsePhysics = false; // Reset physics | 2540 | SceneObjectPart part = parts[i]; |
2543 | break; | 2541 | if (part.Scale.X > m_scene.RegionInfo.PhysPrimMax || |
2542 | part.Scale.Y > m_scene.RegionInfo.PhysPrimMax || | ||
2543 | part.Scale.Z > m_scene.RegionInfo.PhysPrimMax) | ||
2544 | { | ||
2545 | UsePhysics = false; // Reset physics | ||
2546 | break; | ||
2547 | } | ||
2544 | } | 2548 | } |
2545 | } | 2549 | } |
2546 | 2550 | ||