aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
diff options
context:
space:
mode:
authorMelanie2013-10-04 20:03:12 +0100
committerMelanie2013-10-04 20:03:12 +0100
commit75c68fa29e3a2fed81c883e7925bf161e968639f (patch)
tree13ba69e6818f634018a5954d38750cf48128b7f8 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
parentMerge branch 'avination-current' into careminster (diff)
parentminor: Disable logging left active on regression test TestSameSimulatorIsolat... (diff)
downloadopensim-SC_OLD-75c68fa29e3a2fed81c883e7925bf161e968639f.zip
opensim-SC_OLD-75c68fa29e3a2fed81c883e7925bf161e968639f.tar.gz
opensim-SC_OLD-75c68fa29e3a2fed81c883e7925bf161e968639f.tar.bz2
opensim-SC_OLD-75c68fa29e3a2fed81c883e7925bf161e968639f.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Data/MySQL/MySQLSimulationData.cs OpenSim/Data/MySQL/Resources/RegionStore.migrations OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs OpenSim/Region/CoreModules/World/LightShare/LightShareModule.cs OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/Framework/Scenes/ScenePresence.cs OpenSim/Region/Framework/Scenes/Tests/ScenePresenceCapabilityTests.cs OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs21
1 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 9dc52d5..f89b376 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -121,7 +121,7 @@ public abstract class BSPhysObject : PhysicsActor
121 public virtual void Destroy() 121 public virtual void Destroy()
122 { 122 {
123 PhysicalActors.Enable(false); 123 PhysicalActors.Enable(false);
124 PhysScene.TaintedObject("BSPhysObject.Destroy", delegate() 124 PhysScene.TaintedObject(LocalID, "BSPhysObject.Destroy", delegate()
125 { 125 {
126 PhysicalActors.Dispose(); 126 PhysicalActors.Dispose();
127 }); 127 });
@@ -300,8 +300,19 @@ public abstract class BSPhysObject : PhysicsActor
300 // Called in taint-time!! 300 // Called in taint-time!!
301 public void ActivateIfPhysical(bool forceIt) 301 public void ActivateIfPhysical(bool forceIt)
302 { 302 {
303 if (IsPhysical && PhysBody.HasPhysicalBody) 303 if (PhysBody.HasPhysicalBody)
304 PhysScene.PE.Activate(PhysBody, forceIt); 304 {
305 if (IsPhysical)
306 {
307 // Physical objects might need activating
308 PhysScene.PE.Activate(PhysBody, forceIt);
309 }
310 else
311 {
312 // Clear the collision cache since we've changed some properties.
313 PhysScene.PE.ClearCollisionProxyCache(PhysScene.World, PhysBody);
314 }
315 }
305 } 316 }
306 317
307 // 'actors' act on the physical object to change or constrain its motion. These can range from 318 // 'actors' act on the physical object to change or constrain its motion. These can range from
@@ -509,7 +520,7 @@ public abstract class BSPhysObject : PhysicsActor
509 // make sure first collision happens 520 // make sure first collision happens
510 NextCollisionOkTime = Util.EnvironmentTickCountSubtract(SubscribedEventsMs); 521 NextCollisionOkTime = Util.EnvironmentTickCountSubtract(SubscribedEventsMs);
511 522
512 PhysScene.TaintedObject(TypeName+".SubscribeEvents", delegate() 523 PhysScene.TaintedObject(LocalID, TypeName+".SubscribeEvents", delegate()
513 { 524 {
514 if (PhysBody.HasPhysicalBody) 525 if (PhysBody.HasPhysicalBody)
515 CurrentCollisionFlags = PhysScene.PE.AddToCollisionFlags(PhysBody, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); 526 CurrentCollisionFlags = PhysScene.PE.AddToCollisionFlags(PhysBody, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS);
@@ -524,7 +535,7 @@ public abstract class BSPhysObject : PhysicsActor
524 public override void UnSubscribeEvents() { 535 public override void UnSubscribeEvents() {
525 // DetailLog("{0},{1}.UnSubscribeEvents,unsubscribing", LocalID, TypeName); 536 // DetailLog("{0},{1}.UnSubscribeEvents,unsubscribing", LocalID, TypeName);
526 SubscribedEventsMs = 0; 537 SubscribedEventsMs = 0;
527 PhysScene.TaintedObject(TypeName+".UnSubscribeEvents", delegate() 538 PhysScene.TaintedObject(LocalID, TypeName+".UnSubscribeEvents", delegate()
528 { 539 {
529 // Make sure there is a body there because sometimes destruction happens in an un-ideal order. 540 // Make sure there is a body there because sometimes destruction happens in an un-ideal order.
530 if (PhysBody.HasPhysicalBody) 541 if (PhysBody.HasPhysicalBody)