diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs | 12 |
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 | { |