aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
authorRobert Adams2013-02-07 14:44:12 -0800
committerRobert Adams2013-02-07 17:13:27 -0800
commitb545e131846f38cc96757d5c4456c1ee8e7abe75 (patch)
tree25fc86aea7065be784e30d1c7d66fc272d4f7035 /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
parentBulletSim: add user setting of friction, density and restitution. (diff)
downloadopensim-SC_OLD-b545e131846f38cc96757d5c4456c1ee8e7abe75.zip
opensim-SC_OLD-b545e131846f38cc96757d5c4456c1ee8e7abe75.tar.gz
opensim-SC_OLD-b545e131846f38cc96757d5c4456c1ee8e7abe75.tar.bz2
opensim-SC_OLD-b545e131846f38cc96757d5c4456c1ee8e7abe75.tar.xz
BulletSim: fix exceptions caused by setting physical properties before the prim body is initialized.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index a86932a..38adb72 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -587,7 +587,8 @@ public sealed class BSPrim : BSPhysObject
587 base.SetMaterial(material); 587 base.SetMaterial(material);
588 PhysicsScene.TaintedObject("BSPrim.SetMaterial", delegate() 588 PhysicsScene.TaintedObject("BSPrim.SetMaterial", delegate()
589 { 589 {
590 UpdatePhysicalParameters(); 590 if (PhysBody.HasPhysicalBody)
591 UpdatePhysicalParameters();
591 }); 592 });
592 } 593 }
593 public override float Friction 594 public override float Friction
@@ -600,7 +601,8 @@ public sealed class BSPrim : BSPhysObject
600 base.Friction = value; 601 base.Friction = value;
601 PhysicsScene.TaintedObject("BSPrim.setFriction", delegate() 602 PhysicsScene.TaintedObject("BSPrim.setFriction", delegate()
602 { 603 {
603 UpdatePhysicalParameters(); 604 if (PhysBody.HasPhysicalBody)
605 UpdatePhysicalParameters();
604 }); 606 });
605 } 607 }
606 } 608 }
@@ -615,7 +617,8 @@ public sealed class BSPrim : BSPhysObject
615 base.Restitution = value; 617 base.Restitution = value;
616 PhysicsScene.TaintedObject("BSPrim.setRestitution", delegate() 618 PhysicsScene.TaintedObject("BSPrim.setRestitution", delegate()
617 { 619 {
618 UpdatePhysicalParameters(); 620 if (PhysBody.HasPhysicalBody)
621 UpdatePhysicalParameters();
619 }); 622 });
620 } 623 }
621 } 624 }
@@ -630,7 +633,8 @@ public sealed class BSPrim : BSPhysObject
630 base.Density = value; 633 base.Density = value;
631 PhysicsScene.TaintedObject("BSPrim.setDensity", delegate() 634 PhysicsScene.TaintedObject("BSPrim.setDensity", delegate()
632 { 635 {
633 UpdatePhysicalParameters(); 636 if (PhysBody.HasPhysicalBody)
637 UpdatePhysicalParameters();
634 }); 638 });
635 } 639 }
636 } 640 }
@@ -645,7 +649,8 @@ public sealed class BSPrim : BSPhysObject
645 base.GravityModifier = value; 649 base.GravityModifier = value;
646 PhysicsScene.TaintedObject("BSPrim.setGravityModifier", delegate() 650 PhysicsScene.TaintedObject("BSPrim.setGravityModifier", delegate()
647 { 651 {
648 UpdatePhysicalParameters(); 652 if (PhysBody.HasPhysicalBody)
653 UpdatePhysicalParameters();
649 }); 654 });
650 } 655 }
651 } 656 }