aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 9b86abb..580d7ef 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -81,6 +81,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
81 81
82 if (presence.PhysicsActor.Flying) 82 if (presence.PhysicsActor.Flying)
83 { 83 {
84 // A horrible hack to stop the NPC dead in its tracks rather than having them overshoot
85 // the target if flying.
86 // We really need to be more subtle (slow the avatar as it approaches the target) or at
87 // least be able to set collision status once, rather than 5 times to give it enough
88 // weighting so that that PhysicsActor thinks it really is colliding.
84 for (int i = 0; i < 5; i++) 89 for (int i = 0; i < 5; i++)
85 presence.PhysicsActor.IsColliding = true; 90 presence.PhysicsActor.IsColliding = true;
86 91
@@ -106,7 +111,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
106 presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget); 111 presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget);
107 112
108 Vector3 agent_control_v3 = new Vector3(); 113 Vector3 agent_control_v3 = new Vector3();
109 presence.HandleMoveToTargetUpdate(ref agent_control_v3, presence.Rotation); 114 presence.HandleMoveToTargetUpdate(ref agent_control_v3);
110 presence.AddNewMovement(agent_control_v3); 115 presence.AddNewMovement(agent_control_v3);
111 } 116 }
112// 117//