aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 821f470..027c786 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -55,6 +55,16 @@ namespace OpenSim.Region.Physics.BulletSPlugin
55 * BS.ApplyCentralForce BS.ApplyTorque 55 * BS.ApplyCentralForce BS.ApplyTorque
56 */ 56 */
57 57
58// Flags used to denote which properties updates when making UpdateProperties calls to linksets, etc.
59public enum UpdatedProperties : uint
60{
61 Position = 1 << 0,
62 Orientation = 1 << 1,
63 Velocity = 1 << 2,
64 Acceleration = 1 << 3,
65 RotationalVelocity = 1 << 4,
66 EntPropUpdates = Position | Orientation | Velocity | Acceleration | RotationalVelocity,
67}
58public abstract class BSPhysObject : PhysicsActor 68public abstract class BSPhysObject : PhysicsActor
59{ 69{
60 protected BSPhysObject() 70 protected BSPhysObject()
@@ -139,6 +149,11 @@ public abstract class BSPhysObject : PhysicsActor
139 public abstract bool IsStatic { get; } 149 public abstract bool IsStatic { get; }
140 public abstract bool IsSelected { get; } 150 public abstract bool IsSelected { get; }
141 151
152 // It can be confusing for an actor to know if it should move or update an object
153 // depeneding on the setting of 'selected', 'physical, ...
154 // This flag is the true test -- if true, the object is being acted on in the physical world
155 public abstract bool IsPhysicallyActive { get; }
156
142 // Materialness 157 // Materialness
143 public MaterialAttributes.Material Material { get; private set; } 158 public MaterialAttributes.Material Material { get; private set; }
144 public override void SetMaterial(int material) 159 public override void SetMaterial(int material)
@@ -302,8 +317,9 @@ public abstract class BSPhysObject : PhysicsActor
302 public virtual bool SendCollisions() 317 public virtual bool SendCollisions()
303 { 318 {
304 bool ret = true; 319 bool ret = true;
320
305 // If the 'no collision' call, force it to happen right now so quick collision_end 321 // If the 'no collision' call, force it to happen right now so quick collision_end
306 bool force = (CollisionCollection.Count == 0); 322 bool force = (CollisionCollection.Count == 0 && CollisionsLastTick.Count != 0);
307 323
308 // throttle the collisions to the number of milliseconds specified in the subscription 324 // throttle the collisions to the number of milliseconds specified in the subscription
309 if (force || (PhysicsScene.SimulationNowTime >= NextCollisionOkTime)) 325 if (force || (PhysicsScene.SimulationNowTime >= NextCollisionOkTime))
@@ -318,7 +334,7 @@ public abstract class BSPhysObject : PhysicsActor
318 ret = false; 334 ret = false;
319 } 335 }
320 336
321 // DetailLog("{0},{1}.SendCollisionUpdate,call,numCollisions={2}", LocalID, TypeName, CollisionCollection.Count); 337 DetailLog("{0},{1}.SendCollisionUpdate,call,numCollisions={2}", LocalID, TypeName, CollisionCollection.Count);
322 base.SendCollisionUpdate(CollisionCollection); 338 base.SendCollisionUpdate(CollisionCollection);
323 339
324 // Remember the collisions from this tick for some collision specific processing. 340 // Remember the collisions from this tick for some collision specific processing.