aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs
diff options
context:
space:
mode:
authorRobert Adams2013-04-07 14:05:35 -0700
committerRobert Adams2013-04-08 06:27:44 -0700
commita7a1b8b7e9269b446e3396a35153b00942c1e35b (patch)
treedf4c7041eb9a2819dd6e17aa2f95768a552f31e3 /OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs
parentBulletSim: complete movement of physical object action code out of the (diff)
downloadopensim-SC_OLD-a7a1b8b7e9269b446e3396a35153b00942c1e35b.zip
opensim-SC_OLD-a7a1b8b7e9269b446e3396a35153b00942c1e35b.tar.gz
opensim-SC_OLD-a7a1b8b7e9269b446e3396a35153b00942c1e35b.tar.bz2
opensim-SC_OLD-a7a1b8b7e9269b446e3396a35153b00942c1e35b.tar.xz
BulletSim: clean up actor code so routines use the same coding pattern.
Fix a few enabling problems.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs
index 3517ef2..16c2b14 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs
@@ -67,15 +67,12 @@ public class BSActorMoveToTarget : BSActor
67 { 67 {
68 m_physicsScene.DetailLog("{0},BSActorMoveToTarget,refresh", m_controllingPrim.LocalID); 68 m_physicsScene.DetailLog("{0},BSActorMoveToTarget,refresh", m_controllingPrim.LocalID);
69 69
70 // If not active any more, get rid of me (shouldn't ever happen, but just to be safe) 70 // If not active any more...
71 if (!m_controllingPrim.HoverActive) 71 if (!m_controllingPrim.MoveToTargetActive)
72 { 72 {
73 m_physicsScene.DetailLog("{0},BSActorMoveToTarget,refresh,notMoveToTarget,removing={1}", m_controllingPrim.LocalID, ActorName); 73 Enabled = false;
74 m_controllingPrim.PhysicalActors.RemoveAndRelease(ActorName);
75 return;
76 } 74 }
77 75
78 // If the object is physically active, add the hoverer prestep action
79 if (isActive) 76 if (isActive)
80 { 77 {
81 ActivateMoveToTarget(); 78 ActivateMoveToTarget();
@@ -92,7 +89,7 @@ public class BSActorMoveToTarget : BSActor
92 // BSActor.RemoveBodyDependencies() 89 // BSActor.RemoveBodyDependencies()
93 public override void RemoveBodyDependencies() 90 public override void RemoveBodyDependencies()
94 { 91 {
95 // Nothing to do for the hoverer since it is all software at pre-step action time. 92 // Nothing to do for the moveToTarget since it is all software at pre-step action time.
96 } 93 }
97 94
98 // If a hover motor has not been created, create one and start the hovering. 95 // If a hover motor has not been created, create one and start the hovering.
@@ -144,7 +141,6 @@ public class BSActorMoveToTarget : BSActor
144 m_physicsScene.DetailLog("{0},BSPrim.PIDTarget,zeroMovement,movePos={1},pos={2},mass={3}", 141 m_physicsScene.DetailLog("{0},BSPrim.PIDTarget,zeroMovement,movePos={1},pos={2},mass={3}",
145 m_controllingPrim.LocalID, movePosition, m_controllingPrim.RawPosition, m_controllingPrim.Mass); 142 m_controllingPrim.LocalID, movePosition, m_controllingPrim.RawPosition, m_controllingPrim.Mass);
146 m_controllingPrim.ForcePosition = m_targetMotor.TargetValue; 143 m_controllingPrim.ForcePosition = m_targetMotor.TargetValue;
147 m_targetMotor.Enabled = false;
148 } 144 }
149 else 145 else
150 { 146 {