mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
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.
This commit is contained in:
@@ -1650,16 +1650,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
|
||||
if (avatar != null)
|
||||
{
|
||||
List<string> coords = new List<string>();
|
||||
uint regionX = 0;
|
||||
uint regionY = 0;
|
||||
Utils.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY);
|
||||
target.X += regionX;
|
||||
target.Y += regionY;
|
||||
coords.Add(target.X.ToString());
|
||||
coords.Add(target.Y.ToString());
|
||||
coords.Add(target.Z.ToString());
|
||||
avatar.DoMoveToPosition(avatar, "", coords);
|
||||
avatar.DoMoveToPosition(0, target, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user