get rid of vestigal move to parameters

bulletsim
Justin Clark-Casey (justincc) 2011-08-03 22:11:05 +01:00
parent b7a3f36c65
commit 2964467708
10 changed files with 28 additions and 41 deletions

View File

@ -169,7 +169,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
float y = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Y]); float y = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Y]);
float z = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Z]); float z = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Z]);
Vector3 vector = new Vector3(x, y, z); Vector3 vector = new Vector3(x, y, z);
presence.DoMoveToPosition(0, vector, presence.ControllingClient); presence.DoMoveToPosition(vector);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -935,7 +935,7 @@ namespace OpenSim.Framework
event ScriptReset OnScriptReset; event ScriptReset OnScriptReset;
event GetScriptRunning OnGetScriptRunning; event GetScriptRunning OnGetScriptRunning;
event SetScriptRunning OnSetScriptRunning; event SetScriptRunning OnSetScriptRunning;
event UpdateVector OnAutoPilotGo; event Action<Vector3> OnAutoPilotGo;
event TerrainUnacked OnUnackedTerrain; event TerrainUnacked OnUnackedTerrain;
event ActivateGesture OnActivateGesture; event ActivateGesture OnActivateGesture;

View File

@ -231,7 +231,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event ScriptReset OnScriptReset; public event ScriptReset OnScriptReset;
public event GetScriptRunning OnGetScriptRunning; public event GetScriptRunning OnGetScriptRunning;
public event SetScriptRunning OnSetScriptRunning; public event SetScriptRunning OnSetScriptRunning;
public event UpdateVector OnAutoPilotGo; public event Action<Vector3> OnAutoPilotGo;
public event TerrainUnacked OnUnackedTerrain; public event TerrainUnacked OnUnackedTerrain;
public event ActivateGesture OnActivateGesture; public event ActivateGesture OnActivateGesture;
public event DeactivateGesture OnDeactivateGesture; public event DeactivateGesture OnDeactivateGesture;
@ -11617,36 +11617,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected void HandleAutopilot(Object sender, string method, List<String> args) protected void HandleAutopilot(Object sender, string method, List<String> args)
{ {
try float locx = 0;
{ float locy = 0;
float locx = 0f; float locz = 0;
float locy = 0f;
float locz = 0f;
uint regionX = 0; uint regionX = 0;
uint regionY = 0; uint regionY = 0;
try
{
Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out regionX, out regionY); Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out regionX, out regionY);
locx = Convert.ToSingle(args[0]) - (float)regionX; locx = Convert.ToSingle(args[0]) - (float)regionX;
locy = Convert.ToSingle(args[1]) - (float)regionY; locy = Convert.ToSingle(args[1]) - (float)regionY;
locz = Convert.ToSingle(args[2]); locz = Convert.ToSingle(args[2]);
}
catch (InvalidCastException)
{
m_log.Error("[CLIENT]: Invalid autopilot request");
return;
}
UpdateVector handlerAutoPilotGo = OnAutoPilotGo; Action<Vector3> handlerAutoPilotGo = OnAutoPilotGo;
if (handlerAutoPilotGo != null) if (handlerAutoPilotGo != null)
{ handlerAutoPilotGo(new Vector3(locx, locy, locz));
handlerAutoPilotGo(0, new Vector3(locx, locy, locz), this);
}
}
catch (Exception e)
{
m_log.ErrorFormat("[LLCLIENTVIEW]: HandleAutopilot exception {0} {1}", e.Message, e.StackTrace);
}
} }
/// <summary> /// <summary>

View File

@ -222,7 +222,7 @@ namespace OpenSim.Region.Examples.SimpleModule
public event ScriptReset OnScriptReset; public event ScriptReset OnScriptReset;
public event GetScriptRunning OnGetScriptRunning; public event GetScriptRunning OnGetScriptRunning;
public event SetScriptRunning OnSetScriptRunning; public event SetScriptRunning OnSetScriptRunning;
public event UpdateVector OnAutoPilotGo; public event Action<Vector3> OnAutoPilotGo;
public event TerrainUnacked OnUnackedTerrain; public event TerrainUnacked OnUnackedTerrain;

View File

@ -1650,7 +1650,7 @@ namespace OpenSim.Region.Framework.Scenes
ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
if (avatar != null) if (avatar != null)
{ {
avatar.DoMoveToPosition(0, target, null); avatar.DoMoveToPosition(target);
} }
} }
else else

View File

@ -1537,8 +1537,11 @@ namespace OpenSim.Region.Framework.Scenes
} }
/// <summary> /// <summary>
/// Process moving the avatar if a position has been set. /// Process move to update for an avatar.
/// </summary> /// </summary>
/// <remarks>
/// This doesn't actually perform the movement. Instead, it adds its vector to agent_control_v3
/// </remarks>
/// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param> /// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param>
/// <param value="bodyRotation">New body rotation of the avatar.</param> /// <param value="bodyRotation">New body rotation of the avatar.</param>
/// <param value="reset">If true, clear the move to position</param> /// <param value="reset">If true, clear the move to position</param>
@ -1698,7 +1701,7 @@ namespace OpenSim.Region.Framework.Scenes
/// Move this presence to the given position over time. /// Move this presence to the given position over time.
/// </summary> /// </summary>
/// <param name="pos"></param> /// <param name="pos"></param>
public void DoMoveToPosition(uint not_used, Vector3 pos, IClientAPI remote_client) public void DoMoveToPosition(Vector3 pos)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}", // "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}",

View File

@ -806,7 +806,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public event ScriptReset OnScriptReset; public event ScriptReset OnScriptReset;
public event GetScriptRunning OnGetScriptRunning; public event GetScriptRunning OnGetScriptRunning;
public event SetScriptRunning OnSetScriptRunning; public event SetScriptRunning OnSetScriptRunning;
public event UpdateVector OnAutoPilotGo; public event Action<Vector3> OnAutoPilotGo;
public event TerrainUnacked OnUnackedTerrain; public event TerrainUnacked OnUnackedTerrain;
public event ActivateGesture OnActivateGesture; public event ActivateGesture OnActivateGesture;
public event DeactivateGesture OnDeactivateGesture; public event DeactivateGesture OnDeactivateGesture;

View File

@ -328,7 +328,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
public event ScriptReset OnScriptReset; public event ScriptReset OnScriptReset;
public event GetScriptRunning OnGetScriptRunning; public event GetScriptRunning OnGetScriptRunning;
public event SetScriptRunning OnSetScriptRunning; public event SetScriptRunning OnSetScriptRunning;
public event UpdateVector OnAutoPilotGo; public event Action<Vector3> OnAutoPilotGo;
public event TerrainUnacked OnUnackedTerrain; public event TerrainUnacked OnUnackedTerrain;

View File

@ -189,7 +189,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
m_log.DebugFormat( m_log.DebugFormat(
"[NPC MODULE]: Moving {0} to {1} in {2}", sp.Name, pos, scene.RegionInfo.RegionName); "[NPC MODULE]: Moving {0} to {1} in {2}", sp.Name, pos, scene.RegionInfo.RegionName);
sp.DoMoveToPosition(0, pos, m_avatars[agentID]); sp.DoMoveToPosition(pos);
} }
} }
} }

View File

@ -234,7 +234,7 @@ namespace OpenSim.Tests.Common.Mock
public event ScriptReset OnScriptReset; public event ScriptReset OnScriptReset;
public event GetScriptRunning OnGetScriptRunning; public event GetScriptRunning OnGetScriptRunning;
public event SetScriptRunning OnSetScriptRunning; public event SetScriptRunning OnSetScriptRunning;
public event UpdateVector OnAutoPilotGo; public event Action<Vector3> OnAutoPilotGo;
public event TerrainUnacked OnUnackedTerrain; public event TerrainUnacked OnUnackedTerrain;