From 2964467708871f5932c46ad04e002a5506dd7732 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 3 Aug 2011 22:11:05 +0100 Subject: get rid of vestigal move to parameters --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 44 +++++++--------------- 1 file changed, 14 insertions(+), 30 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index bb491a1..4a36b5d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -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 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 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 handlerAutoPilotGo = OnAutoPilotGo; + if (handlerAutoPilotGo != null) + handlerAutoPilotGo(new Vector3(locx, locy, locz)); } /// -- cgit v1.1