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

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1537,8 +1537,11 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <summary>
/// Process moving the avatar if a position has been set.
/// Process move to update for an avatar.
/// </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="bodyRotation">New body rotation of the avatar.</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.
/// </summary>
/// <param name="pos"></param>
public void DoMoveToPosition(uint not_used, Vector3 pos, IClientAPI remote_client)
public void DoMoveToPosition(Vector3 pos)
{
// m_log.DebugFormat(
// "[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 GetScriptRunning OnGetScriptRunning;
public event SetScriptRunning OnSetScriptRunning;
public event UpdateVector OnAutoPilotGo;
public event Action<Vector3> OnAutoPilotGo;
public event TerrainUnacked OnUnackedTerrain;
public event ActivateGesture OnActivateGesture;
public event DeactivateGesture OnDeactivateGesture;

View File

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

View File

@ -189,7 +189,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
m_log.DebugFormat(
"[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 GetScriptRunning OnGetScriptRunning;
public event SetScriptRunning OnSetScriptRunning;
public event UpdateVector OnAutoPilotGo;
public event Action<Vector3> OnAutoPilotGo;
public event TerrainUnacked OnUnackedTerrain;