diff options
author | UbitUmarov | 2012-06-21 19:05:36 +0100 |
---|---|---|
committer | UbitUmarov | 2012-06-21 19:05:36 +0100 |
commit | c8f7cd60cd5e16b6917c0b67358bee4eb04716d1 (patch) | |
tree | f72783cb0565bef83f37bb6e893bf7c43c84009d /OpenSim/Region/Framework/Scenes | |
parent | fix SceneGraph Add/Remove PhysicalPrim counters (diff) | |
download | opensim-SC-c8f7cd60cd5e16b6917c0b67358bee4eb04716d1.zip opensim-SC-c8f7cd60cd5e16b6917c0b67358bee4eb04716d1.tar.gz opensim-SC-c8f7cd60cd5e16b6917c0b67358bee4eb04716d1.tar.bz2 opensim-SC-c8f7cd60cd5e16b6917c0b67358bee4eb04716d1.tar.xz |
fix turning off phanton always decreasing number of physical parts
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 8e74dc8..a48605d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4496,7 +4496,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4496 | { | 4496 | { |
4497 | if (pa != null) | 4497 | if (pa != null) |
4498 | { | 4498 | { |
4499 | ParentGroup.Scene.RemovePhysicalPrim(1); | 4499 | if(wasUsingPhysics) |
4500 | ParentGroup.Scene.RemovePhysicalPrim(1); | ||
4500 | RemoveFromPhysics(); | 4501 | RemoveFromPhysics(); |
4501 | } | 4502 | } |
4502 | 4503 | ||
@@ -4513,38 +4514,37 @@ namespace OpenSim.Region.Framework.Scenes | |||
4513 | { | 4514 | { |
4514 | AddToPhysics(UsePhysics, SetPhantom, building, false); | 4515 | AddToPhysics(UsePhysics, SetPhantom, building, false); |
4515 | pa = PhysActor; | 4516 | pa = PhysActor; |
4516 | /* | 4517 | /* |
4517 | if (pa != null) | 4518 | if (pa != null) |
4518 | { | 4519 | { |
4519 | if ( | 4520 | if ( |
4520 | // ((AggregateScriptEvents & scriptEvents.collision) != 0) || | 4521 | // ((AggregateScriptEvents & scriptEvents.collision) != 0) || |
4521 | // ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || | 4522 | // ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || |
4522 | // ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || | 4523 | // ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || |
4523 | // ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || | 4524 | // ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || |
4524 | // ((AggregateScriptEvents & scriptEvents.land_collision) != 0) || | 4525 | // ((AggregateScriptEvents & scriptEvents.land_collision) != 0) || |
4525 | // ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || | 4526 | // ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || |
4526 | ((AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) || | 4527 | ((AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) || |
4527 | ((ParentGroup.RootPart.AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) || | 4528 | ((ParentGroup.RootPart.AggregateScriptEvents & PhysicsNeededSubsEvents) != 0) || |
4528 | (CollisionSound != UUID.Zero) | 4529 | (CollisionSound != UUID.Zero) |
4529 | ) | 4530 | ) |
4530 | { | 4531 | { |
4531 | pa.OnCollisionUpdate += PhysicsCollision; | 4532 | pa.OnCollisionUpdate += PhysicsCollision; |
4532 | pa.SubscribeEvents(1000); | 4533 | pa.SubscribeEvents(1000); |
4533 | } | 4534 | } |
4534 | } | 4535 | } |
4535 | */ | 4536 | */ |
4536 | } | 4537 | } |
4537 | 4538 | ||
4538 | else // it already has a physical representation | 4539 | else // it already has a physical representation |
4539 | { | 4540 | { |
4540 | DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. | 4541 | DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. |
4541 | /* moved into DoPhysicsPropertyUpdate | 4542 | /* moved into DoPhysicsPropertyUpdate |
4542 | if(VolumeDetectActive) | 4543 | if(VolumeDetectActive) |
4543 | pa.SetVolumeDetect(1); | 4544 | pa.SetVolumeDetect(1); |
4544 | else | 4545 | else |
4545 | pa.SetVolumeDetect(0); | 4546 | pa.SetVolumeDetect(0); |
4546 | */ | 4547 | */ |
4547 | |||
4548 | 4548 | ||
4549 | if (pa.Building != building) | 4549 | if (pa.Building != building) |
4550 | pa.Building = building; | 4550 | pa.Building = building; |