diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index dd94240..fdc3485 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -70,12 +70,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
70 | // presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget, distanceToTarget); | 70 | // presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget, distanceToTarget); |
71 | 71 | ||
72 | // Check the error term of the current position in relation to the target position | 72 | // Check the error term of the current position in relation to the target position |
73 | if (distanceToTarget <= 1) | 73 | if (distanceToTarget <= 2) |
74 | { | 74 | { |
75 | // m_log.DebugFormat("[NPC MODULE]: Stopping movement of npc {0} {1}", presence.Name, presence.UUID); | 75 | // m_log.DebugFormat("[NPC MODULE]: Stopping movement of npc {0} {1}", presence.Name, presence.UUID); |
76 | // We are close enough to the target for now | 76 | // We are close enough to the target for now |
77 | presence.ResetMoveToTarget(); | ||
78 | presence.Velocity = Vector3.Zero; | 77 | presence.Velocity = Vector3.Zero; |
78 | presence.AbsolutePosition = presence.MoveToPositionTarget; | ||
79 | presence.ResetMoveToTarget(); | ||
79 | 80 | ||
80 | // FIXME: This doesn't work | 81 | // FIXME: This doesn't work |
81 | if (presence.PhysicsActor.Flying) | 82 | if (presence.PhysicsActor.Flying) |