aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs20
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index aeeb4dd..38ab3de 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -173,6 +173,7 @@ public sealed class BSPrim : BSPhysObject
173 } 173 }
174 public override bool ForceBodyShapeRebuild(bool inTaintTime) 174 public override bool ForceBodyShapeRebuild(bool inTaintTime)
175 { 175 {
176 LastAssetBuildFailed = false;
176 BSScene.TaintCallback rebuildOperation = delegate() 177 BSScene.TaintCallback rebuildOperation = delegate()
177 { 178 {
178 _mass = CalculateMass(); // changing the shape changes the mass 179 _mass = CalculateMass(); // changing the shape changes the mass
@@ -295,7 +296,7 @@ public sealed class BSPrim : BSPhysObject
295 private bool PositionSanityCheck() 296 private bool PositionSanityCheck()
296 { 297 {
297 bool ret = false; 298 bool ret = false;
298 299
299 // If totally below the ground, move the prim up 300 // If totally below the ground, move the prim up
300 // TODO: figure out the right solution for this... only for dynamic objects? 301 // TODO: figure out the right solution for this... only for dynamic objects?
301 /* 302 /*
@@ -398,7 +399,7 @@ public sealed class BSPrim : BSPhysObject
398 { 399 {
399 // Done at taint time so we're sure the physics engine is not using the variables 400 // Done at taint time so we're sure the physics engine is not using the variables
400 // Vehicle code changes the parameters for this vehicle type. 401 // Vehicle code changes the parameters for this vehicle type.
401 this._vehicle.ProcessTypeChange(type); 402 _vehicle.ProcessTypeChange(type);
402 }); 403 });
403 } 404 }
404 } 405 }
@@ -510,7 +511,7 @@ public sealed class BSPrim : BSPhysObject
510 }); 511 });
511 } 512 }
512 } 513 }
513 // Go directly to Bullet to get/set the value. 514 // Go directly to Bullet to get/set the value.
514 public override OMV.Quaternion ForceOrientation 515 public override OMV.Quaternion ForceOrientation
515 { 516 {
516 get 517 get
@@ -768,7 +769,7 @@ public sealed class BSPrim : BSPhysObject
768 } 769 }
769 } 770 }
770 public override bool FloatOnWater { 771 public override bool FloatOnWater {
771 set { 772 set {
772 _floatOnWater = value; 773 _floatOnWater = value;
773 PhysicsScene.TaintedObject("BSPrim.setFloatOnWater", delegate() 774 PhysicsScene.TaintedObject("BSPrim.setFloatOnWater", delegate()
774 { 775 {
@@ -971,7 +972,7 @@ public sealed class BSPrim : BSPhysObject
971 if (hollowAmount > 0.0) 972 if (hollowAmount > 0.0)
972 { 973 {
973 hollowVolume *= hollowAmount; 974 hollowVolume *= hollowAmount;
974 975
975 switch (BaseShape.HollowShape) 976 switch (BaseShape.HollowShape)
976 { 977 {
977 case HollowShape.Square: 978 case HollowShape.Square:
@@ -1245,13 +1246,14 @@ public sealed class BSPrim : BSPhysObject
1245 FillShapeInfo(out shapeData); 1246 FillShapeInfo(out shapeData);
1246 1247
1247 // If this prim is part of a linkset, we must remove and restore the physical 1248 // If this prim is part of a linkset, we must remove and restore the physical
1248 // links of the body is rebuilt. 1249 // links if the body is rebuilt.
1249 bool needToRestoreLinkset = false; 1250 bool needToRestoreLinkset = false;
1250 1251
1251 // Create the correct physical representation for this type of object. 1252 // Create the correct physical representation for this type of object.
1252 // Updates BSBody and BSShape with the new information. 1253 // Updates BSBody and BSShape with the new information.
1253 // Ignore 'forceRebuild'. This routine makes the right choices and changes of necessary. 1254 // Ignore 'forceRebuild'. This routine makes the right choices and changes of necessary.
1254 PhysicsScene.Shapes.GetBodyAndShape(false, PhysicsScene.World, this, shapeData, BaseShape, 1255 // Returns 'true' if either the body or the shape was changed.
1256 PhysicsScene.Shapes.GetBodyAndShape(false, PhysicsScene.World, this, shapeData, BaseShape,
1255 null, delegate(BulletBody dBody) 1257 null, delegate(BulletBody dBody)
1256 { 1258 {
1257 // Called if the current prim body is about to be destroyed. 1259 // Called if the current prim body is about to be destroyed.
@@ -1354,7 +1356,7 @@ public sealed class BSPrim : BSPhysObject
1354 DetailLog("{0},BSPrim.UpdateProperties,call,pos={1},orient={2},vel={3},accel={4},rotVel={5}", 1356 DetailLog("{0},BSPrim.UpdateProperties,call,pos={1},orient={2},vel={3},accel={4},rotVel={5}",
1355 LocalID, _position, _orientation, _velocity, _acceleration, _rotationalVelocity); 1357 LocalID, _position, _orientation, _velocity, _acceleration, _rotationalVelocity);
1356 1358
1357 // BulletSimAPI.DumpRigidBody2(Scene.World.Ptr, BSBody.Ptr); 1359 // BulletSimAPI.DumpRigidBody2(PhysicsScene.World.ptr, BSBody.ptr); // DEBUG DEBUG DEBUG
1358 1360
1359 base.RequestPhysicsterseUpdate(); 1361 base.RequestPhysicsterseUpdate();
1360 } 1362 }
@@ -1367,8 +1369,8 @@ public sealed class BSPrim : BSPhysObject
1367 entprop.Acceleration, entprop.RotationalVelocity); 1369 entprop.Acceleration, entprop.RotationalVelocity);
1368 } 1370 }
1369 */ 1371 */
1370 // The linkset implimentation might want to know about this.
1371 1372
1373 // The linkset implimentation might want to know about this.
1372 Linkset.UpdateProperties(this); 1374 Linkset.UpdateProperties(this);
1373 } 1375 }
1374} 1376}