diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index 4669d91..90da7a6 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -72,11 +72,6 @@ public abstract class BSPhysObject : PhysicsActor | |||
72 | } | 72 | } |
73 | protected BSPhysObject(BSScene parentScene, uint localID, string name, string typeName) | 73 | protected BSPhysObject(BSScene parentScene, uint localID, string name, string typeName) |
74 | { | 74 | { |
75 | InitializePhysObject(parentScene, localID, name, typeName); | ||
76 | } | ||
77 | |||
78 | protected void InitializePhysObject(BSScene parentScene, uint localID, string name, string typeName) | ||
79 | { | ||
80 | IsInitialized = false; | 75 | IsInitialized = false; |
81 | 76 | ||
82 | PhysScene = parentScene; | 77 | PhysScene = parentScene; |
@@ -124,8 +119,6 @@ public abstract class BSPhysObject : PhysicsActor | |||
124 | // Tell the object to clean up. | 119 | // Tell the object to clean up. |
125 | public virtual void Destroy() | 120 | public virtual void Destroy() |
126 | { | 121 | { |
127 | SubscribedEventsMs = 0; | ||
128 | |||
129 | PhysicalActors.Enable(false); | 122 | PhysicalActors.Enable(false); |
130 | PhysScene.TaintedObject(LocalID, "BSPhysObject.Destroy", delegate() | 123 | PhysScene.TaintedObject(LocalID, "BSPhysObject.Destroy", delegate() |
131 | { | 124 | { |
@@ -462,7 +455,6 @@ public abstract class BSPhysObject : PhysicsActor | |||
462 | // Return 'true' if a collision was processed and should be sent up. | 455 | // Return 'true' if a collision was processed and should be sent up. |
463 | // Return 'false' if this object is not enabled/subscribed/appropriate for or has already seen this collision. | 456 | // Return 'false' if this object is not enabled/subscribed/appropriate for or has already seen this collision. |
464 | // Called at taint time from within the Step() function | 457 | // Called at taint time from within the Step() function |
465 | // Both 'CollisionLock' and 'PhysObjects' are locked when this is called by 'SendCollisions'. | ||
466 | public delegate bool CollideCall(uint collidingWith, BSPhysObject collidee, OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth); | 458 | public delegate bool CollideCall(uint collidingWith, BSPhysObject collidee, OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth); |
467 | public virtual bool Collide(uint collidingWith, BSPhysObject collidee, | 459 | public virtual bool Collide(uint collidingWith, BSPhysObject collidee, |
468 | OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth) | 460 | OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth) |
@@ -520,7 +512,7 @@ public abstract class BSPhysObject : PhysicsActor | |||
520 | 512 | ||
521 | // If no collisions this call but there were collisions last call, force the collision | 513 | // If no collisions this call but there were collisions last call, force the collision |
522 | // event to be happen right now so quick collision_end. | 514 | // event to be happen right now so quick collision_end. |
523 | bool force = (CollisionCollection.Count == 0 && CollisionsLastReported.Count != 0); | 515 | bool force = (CollisionCollection.Count == 0 && CollisionsLastReported.Count != 0); |
524 | 516 | ||
525 | // throttle the collisions to the number of milliseconds specified in the subscription | 517 | // throttle the collisions to the number of milliseconds specified in the subscription |
526 | if (force || (PhysScene.SimulationNowTime >= NextCollisionOkTime)) | 518 | if (force || (PhysScene.SimulationNowTime >= NextCollisionOkTime)) |
@@ -553,7 +545,7 @@ public abstract class BSPhysObject : PhysicsActor | |||
553 | // Subscribe for collision events. | 545 | // Subscribe for collision events. |
554 | // Parameter is the millisecond rate the caller wishes collision events to occur. | 546 | // Parameter is the millisecond rate the caller wishes collision events to occur. |
555 | public override void SubscribeEvents(int ms) { | 547 | public override void SubscribeEvents(int ms) { |
556 | DetailLog("{0},{1}.SubscribeEvents,subscribing,ms={2}", LocalID, TypeName, ms); | 548 | // DetailLog("{0},{1}.SubscribeEvents,subscribing,ms={2}", LocalID, TypeName, ms); |
557 | SubscribedEventsMs = ms; | 549 | SubscribedEventsMs = ms; |
558 | if (ms > 0) | 550 | if (ms > 0) |
559 | { | 551 | { |