diff options
author | Justin Clark-Casey (justincc) | 2011-11-05 01:38:42 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-11-05 01:38:42 +0000 |
commit | 28c4dc9be490a3beedccb17bc1b411e45cced846 (patch) | |
tree | a399c6faf3f08e53f20ae4aba546aff9cfdd083e /OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |
parent | Add comment for experimental effect of removing the Thread.Sleep(20) in ODEPr... (diff) | |
download | opensim-SC-28c4dc9be490a3beedccb17bc1b411e45cced846.zip opensim-SC-28c4dc9be490a3beedccb17bc1b411e45cced846.tar.gz opensim-SC-28c4dc9be490a3beedccb17bc1b411e45cced846.tar.bz2 opensim-SC-28c4dc9be490a3beedccb17bc1b411e45cced846.tar.xz |
Fix NPC sitting for prims without a sit target.
This is to partially address http://opensimulator.org/mantis/view.php?id=5769
We don't need to call SP.HandleAgentSit() again if we are within 10m since the autopilot won't trigger.
By calling it twice, the position of the sitting NPC was wrongly adjusted, ending up near <0,0,0>.
However, this change does mean that NPCs further than 10m away will not attempt to autopilot to the prim, though this code was broken anyway (is actually a different mechanism to normal NPC movmeent).
Hopefully this can be addressed soon.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 10181aa..56ff367 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -208,7 +208,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
208 | ScenePresence sp; | 208 | ScenePresence sp; |
209 | scene.TryGetScenePresence(agentID, out sp); | 209 | scene.TryGetScenePresence(agentID, out sp); |
210 | sp.HandleAgentRequestSit(m_avatars[agentID], agentID, partID, Vector3.Zero); | 210 | sp.HandleAgentRequestSit(m_avatars[agentID], agentID, partID, Vector3.Zero); |
211 | sp.HandleAgentSit(m_avatars[agentID], agentID); | 211 | // sp.HandleAgentSit(m_avatars[agentID], agentID); |
212 | 212 | ||
213 | return true; | 213 | return true; |
214 | } | 214 | } |