diff options
author | Justin Clark-Casey (justincc) | 2011-08-11 03:05:51 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-11 03:06:38 +0100 |
commit | 1aa171189397f34d7d18fb358f7bd767d241675a (patch) | |
tree | 474334e8cd0c01f4d39a7aab1aaae5bef55316ea /OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |
parent | instead of setting avatar rotation twice in SP.HandleAgentUpdate(), eliminate... (diff) | |
download | opensim-SC_OLD-1aa171189397f34d7d18fb358f7bd767d241675a.zip opensim-SC_OLD-1aa171189397f34d7d18fb358f7bd767d241675a.tar.gz opensim-SC_OLD-1aa171189397f34d7d18fb358f7bd767d241675a.tar.bz2 opensim-SC_OLD-1aa171189397f34d7d18fb358f7bd767d241675a.tar.xz |
eliminate the rotation parameter from SP.HandleMoveToTargetUpdate(). This can just use the currently set Rotation
looks like I spoke to soon about eliminating jerkiness on "go here"/autopilot. It's still there.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 7 |
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 | // |