From c122489e0947300753281e88771b7a74d49869c7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 2 Aug 2011 23:41:12 +0100 Subject: Partially fix autopilot/go here This now works again except that it requires a click or avatar mvmt to get going This is because the ScenePresence.HandleAgentUpdate() method doesn't trigger until the client does something significant, at which point autopilot takes over. Even clicking is enough to trigger. This will be improved presently. --- OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 1 + OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 3afcc8d..e87993a 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -99,6 +99,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } + public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) { diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 6286dc8..8cb8318 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -140,7 +140,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC { ScenePresence sp; scene.TryGetScenePresence(agentID, out sp); - sp.DoAutoPilot(0, pos, m_avatars[agentID]); + +// m_log.DebugFormat( +// "[NPC MODULE]: Moving {0} to {1} in {2}", sp.Name, pos, scene.RegionInfo.RegionName); +// +// List targetArgs = new List(); +// targetArgs.Add(pos.X); +// targetArgs.Add(pos.Y); +// targetArgs.Add(pos.Z); +// sp.DoMoveToPosition(null, "NPC", targetArgs); +// sp.DoMoveToPosition(0, pos, m_avatars[agentID]); } } } -- cgit v1.1