aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorMelanie2011-10-25 01:53:02 +0100
committerMelanie2011-10-25 01:53:02 +0100
commit28d2103439db894294083b5724652ad2bc433137 (patch)
tree6aeb3afbcc218c4a19e07d2d65c6f7d3127a930b /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentMerge commit 'c93c9ea072f319125f466c913f5f4fe1f6864045' into bigmerge (diff)
parentrefactor: Remove redundant code in SOP.UpdatePrimFlags() (diff)
downloadopensim-SC_OLD-28d2103439db894294083b5724652ad2bc433137.zip
opensim-SC_OLD-28d2103439db894294083b5724652ad2bc433137.tar.gz
opensim-SC_OLD-28d2103439db894294083b5724652ad2bc433137.tar.bz2
opensim-SC_OLD-28d2103439db894294083b5724652ad2bc433137.tar.xz
Merge commit '732e9373795a35ed1965bbb93a02117fcf0a8c3e' into bigmerge
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs48
1 files changed, 21 insertions, 27 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 1cdd567..97434bd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4466,9 +4466,7 @@ namespace OpenSim.Region.Framework.Scenes
4466 if (ParentGroup.Scene == null) 4466 if (ParentGroup.Scene == null)
4467 return; 4467 return;
4468 4468
4469 PhysicsActor pa = PhysActor; 4469 if (PhysActor == null)
4470
4471 if (pa == null)
4472 { 4470 {
4473 // It's not phantom anymore. So make sure the physics engine get's knowledge of it 4471 // It's not phantom anymore. So make sure the physics engine get's knowledge of it
4474 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 4472 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
@@ -4480,38 +4478,34 @@ namespace OpenSim.Region.Framework.Scenes
4480 UsePhysics, 4478 UsePhysics,
4481 m_localId); 4479 m_localId);
4482 4480
4483 pa = PhysActor; 4481 PhysActor.SetMaterial(Material);
4484 if (pa != null) 4482 DoPhysicsPropertyUpdate(UsePhysics, true);
4485 {
4486 PhysActor.SetMaterial(Material);
4487 DoPhysicsPropertyUpdate(UsePhysics, true);
4488 4483
4489 if (!m_parentGroup.IsDeleted) 4484 if (!m_parentGroup.IsDeleted)
4485 {
4486 if (LocalId == m_parentGroup.RootPart.LocalId)
4490 { 4487 {
4491 if (LocalId == m_parentGroup.RootPart.LocalId) 4488 m_parentGroup.CheckSculptAndLoad();
4492 {
4493 m_parentGroup.CheckSculptAndLoad();
4494 }
4495 } 4489 }
4490 }
4496 4491
4497 if ( 4492 if (
4498 ((AggregateScriptEvents & scriptEvents.collision) != 0) || 4493 ((AggregateScriptEvents & scriptEvents.collision) != 0) ||
4499 ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || 4494 ((AggregateScriptEvents & scriptEvents.collision_end) != 0) ||
4500 ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || 4495 ((AggregateScriptEvents & scriptEvents.collision_start) != 0) ||
4501 ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || 4496 ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) ||
4502 ((AggregateScriptEvents & scriptEvents.land_collision) != 0) || 4497 ((AggregateScriptEvents & scriptEvents.land_collision) != 0) ||
4503 ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || 4498 ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) ||
4504 (CollisionSound != UUID.Zero) 4499 (CollisionSound != UUID.Zero)
4505 ) 4500 )
4506 { 4501 {
4507 PhysActor.OnCollisionUpdate += PhysicsCollision; 4502 PhysActor.OnCollisionUpdate += PhysicsCollision;
4508 PhysActor.SubscribeEvents(1000); 4503 PhysActor.SubscribeEvents(1000);
4509 }
4510 } 4504 }
4511 } 4505 }
4512 else // it already has a physical representation 4506 else // it already has a physical representation
4513 { 4507 {
4514 pa.IsPhysical = UsePhysics; 4508 PhysActor.IsPhysical = UsePhysics;
4515 4509
4516 DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. If it's phantom this will remove the prim 4510 DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. If it's phantom this will remove the prim
4517 4511