aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-04-02 00:46:53 +0100
committerJustin Clark-Casey (justincc)2013-04-02 00:46:53 +0100
commit600087ab49e9489e37471ccfb7360ac14d31b7f2 (patch)
tree7fd908e81185346da6d0bd3561c2712519942117 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
parentChange recent MSSQL migrations to drop COLUMN from ALTER TABLE which is eithe... (diff)
parentBulletSim: stop an avatar from moving if standing on a stationary (diff)
downloadopensim-SC_OLD-600087ab49e9489e37471ccfb7360ac14d31b7f2.zip
opensim-SC_OLD-600087ab49e9489e37471ccfb7360ac14d31b7f2.tar.gz
opensim-SC_OLD-600087ab49e9489e37471ccfb7360ac14d31b7f2.tar.bz2
opensim-SC_OLD-600087ab49e9489e37471ccfb7360ac14d31b7f2.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 6bb88c7..98ea833 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -78,6 +78,9 @@ public abstract class BSPhysObject : PhysicsActor
78 Name = name; // PhysicsActor also has the name of the object. Someday consolidate. 78 Name = name; // PhysicsActor also has the name of the object. Someday consolidate.
79 TypeName = typeName; 79 TypeName = typeName;
80 80
81 // The collection of things that push me around
82 PhysicalActors = new BSActorCollection(PhysicsScene);
83
81 // Initialize variables kept in base. 84 // Initialize variables kept in base.
82 GravModifier = 1.0f; 85 GravModifier = 1.0f;
83 Gravity = new OMV.Vector3(0f, 0f, BSParam.Gravity); 86 Gravity = new OMV.Vector3(0f, 0f, BSParam.Gravity);
@@ -109,6 +112,10 @@ public abstract class BSPhysObject : PhysicsActor
109 { 112 {
110 UnRegisterAllPreStepActions(); 113 UnRegisterAllPreStepActions();
111 UnRegisterAllPostStepActions(); 114 UnRegisterAllPostStepActions();
115 PhysicsScene.TaintedObject("BSPhysObject.Destroy", delegate()
116 {
117 PhysicalActors.Release();
118 });
112 } 119 }
113 120
114 public BSScene PhysicsScene { get; protected set; } 121 public BSScene PhysicsScene { get; protected set; }
@@ -180,7 +187,7 @@ public abstract class BSPhysObject : PhysicsActor
180 Friction = matAttrib.friction; 187 Friction = matAttrib.friction;
181 Restitution = matAttrib.restitution; 188 Restitution = matAttrib.restitution;
182 Density = matAttrib.density / BSParam.DensityScaleFactor; 189 Density = matAttrib.density / BSParam.DensityScaleFactor;
183 DetailLog("{0},{1}.SetMaterial,Mat={2},frict={3},rest={4},den={5}", LocalID, TypeName, Material, Friction, Restitution, Density); 190 // DetailLog("{0},{1}.SetMaterial,Mat={2},frict={3},rest={4},den={5}", LocalID, TypeName, Material, Friction, Restitution, Density);
184 } 191 }
185 192
186 // Stop all physical motion. 193 // Stop all physical motion.
@@ -230,6 +237,7 @@ public abstract class BSPhysObject : PhysicsActor
230 237
231 public OMV.Vector3 LockedAxis { get; set; } // zero means locked. one means free. 238 public OMV.Vector3 LockedAxis { get; set; } // zero means locked. one means free.
232 public readonly OMV.Vector3 LockedAxisFree = new OMV.Vector3(1f, 1f, 1f); // All axis are free 239 public readonly OMV.Vector3 LockedAxisFree = new OMV.Vector3(1f, 1f, 1f); // All axis are free
240 public readonly String LockedAxisActorName = "BSPrim.LockedAxis";
233 241
234 #region Collisions 242 #region Collisions
235 243
@@ -413,6 +421,9 @@ public abstract class BSPhysObject : PhysicsActor
413 #endregion // Collisions 421 #endregion // Collisions
414 422
415 #region Per Simulation Step actions 423 #region Per Simulation Step actions
424
425 public BSActorCollection PhysicalActors;
426
416 // There are some actions that must be performed for a physical object before each simulation step. 427 // There are some actions that must be performed for a physical object before each simulation step.
417 // These actions are optional so, rather than scanning all the physical objects and asking them 428 // These actions are optional so, rather than scanning all the physical objects and asking them
418 // if they have anything to do, a physical object registers for an event call before the step is performed. 429 // if they have anything to do, a physical object registers for an event call before the step is performed.