diff options
author | UbitUmarov | 2014-08-12 23:57:41 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-12 23:57:41 +0100 |
commit | 20b3cab5d1cb1bbbe951a90ae6de7ffb495e6375 (patch) | |
tree | f32e183217a74d24ed5816bf7d6b6c33a44bdf6c /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |
parent | do the significance test invalidation at MoveAgentToRegion (diff) | |
download | opensim-SC-20b3cab5d1cb1bbbe951a90ae6de7ffb495e6375.zip opensim-SC-20b3cab5d1cb1bbbe951a90ae6de7ffb495e6375.tar.gz opensim-SC-20b3cab5d1cb1bbbe951a90ae6de7ffb495e6375.tar.bz2 opensim-SC-20b3cab5d1cb1bbbe951a90ae6de7ffb495e6375.tar.xz |
take agentUpdate checks out of llUDPserver (disabling useless debug) and
do it only where its supposed to be done..
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f5bb70b..9462bdc 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -5819,55 +5819,63 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5819 | return cameraSignificant; | 5819 | return cameraSignificant; |
5820 | } | 5820 | } |
5821 | 5821 | ||
5822 | private bool HandleAgentUpdate(IClientAPI sener, Packet packet) | 5822 | private bool HandleAgentUpdate(IClientAPI sender, Packet packet) |
5823 | { | 5823 | { |
5824 | // We got here, which means that something in agent update was significant | 5824 | // We got here, which means that something in agent update was significant |
5825 | 5825 | ||
5826 | AgentUpdatePacket agentUpdate = (AgentUpdatePacket)packet; | 5826 | AgentUpdatePacket agentUpdate = (AgentUpdatePacket)packet; |
5827 | AgentUpdatePacket.AgentDataBlock x = agentUpdate.AgentData; | 5827 | AgentUpdatePacket.AgentDataBlock x = agentUpdate.AgentData; |
5828 | 5828 | ||
5829 | if (x.AgentID != AgentId || x.SessionID != SessionId) | 5829 | if (x.AgentID != AgentId || x.SessionID != SessionId) |
5830 | { | ||
5831 | PacketPool.Instance.ReturnPacket(packet); | ||
5830 | return false; | 5832 | return false; |
5833 | } | ||
5834 | |||
5835 | TotalAgentUpdates++; | ||
5831 | 5836 | ||
5832 | // Before we update the current m_thisAgentUpdateArgs, let's check this again | ||
5833 | // to see what exactly changed | ||
5834 | bool movement = CheckAgentMovementUpdateSignificance(x); | 5837 | bool movement = CheckAgentMovementUpdateSignificance(x); |
5835 | bool camera = CheckAgentCameraUpdateSignificance(x); | 5838 | bool camera = CheckAgentCameraUpdateSignificance(x); |
5836 | 5839 | ||
5837 | m_thisAgentUpdateArgs.AgentID = x.AgentID; | ||
5838 | m_thisAgentUpdateArgs.BodyRotation = x.BodyRotation; | ||
5839 | m_thisAgentUpdateArgs.CameraAtAxis = x.CameraAtAxis; | ||
5840 | m_thisAgentUpdateArgs.CameraCenter = x.CameraCenter; | ||
5841 | m_thisAgentUpdateArgs.CameraLeftAxis = x.CameraLeftAxis; | ||
5842 | m_thisAgentUpdateArgs.CameraUpAxis = x.CameraUpAxis; | ||
5843 | m_thisAgentUpdateArgs.ControlFlags = x.ControlFlags; | ||
5844 | m_thisAgentUpdateArgs.Far = x.Far; | ||
5845 | m_thisAgentUpdateArgs.Flags = x.Flags; | ||
5846 | m_thisAgentUpdateArgs.HeadRotation = x.HeadRotation; | ||
5847 | m_thisAgentUpdateArgs.SessionID = x.SessionID; | ||
5848 | m_thisAgentUpdateArgs.State = x.State; | ||
5849 | |||
5850 | UpdateAgent handlerAgentUpdate = OnAgentUpdate; | ||
5851 | UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate; | ||
5852 | UpdateAgent handlerAgentCameraUpdate = OnAgentCameraUpdate; | ||
5853 | |||
5854 | // Was there a significant movement/state change? | 5840 | // Was there a significant movement/state change? |
5855 | if (movement) | 5841 | if (movement) |
5856 | { | 5842 | { |
5843 | m_thisAgentUpdateArgs.BodyRotation = x.BodyRotation; | ||
5844 | m_thisAgentUpdateArgs.ControlFlags = x.ControlFlags; | ||
5845 | m_thisAgentUpdateArgs.Far = x.Far; | ||
5846 | m_thisAgentUpdateArgs.Flags = x.Flags; | ||
5847 | m_thisAgentUpdateArgs.HeadRotation = x.HeadRotation; | ||
5848 | m_thisAgentUpdateArgs.SessionID = x.SessionID; | ||
5849 | m_thisAgentUpdateArgs.State = x.State; | ||
5850 | |||
5851 | UpdateAgent handlerAgentUpdate = OnAgentUpdate; | ||
5852 | UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate; | ||
5853 | |||
5857 | if (handlerPreAgentUpdate != null) | 5854 | if (handlerPreAgentUpdate != null) |
5858 | OnPreAgentUpdate(this, m_thisAgentUpdateArgs); | 5855 | OnPreAgentUpdate(this, m_thisAgentUpdateArgs); |
5859 | 5856 | ||
5860 | if (handlerAgentUpdate != null) | 5857 | if (handlerAgentUpdate != null) |
5861 | OnAgentUpdate(this, m_thisAgentUpdateArgs); | 5858 | OnAgentUpdate(this, m_thisAgentUpdateArgs); |
5859 | |||
5860 | handlerAgentUpdate = null; | ||
5861 | handlerPreAgentUpdate = null; | ||
5862 | } | 5862 | } |
5863 | |||
5863 | // Was there a significant camera(s) change? | 5864 | // Was there a significant camera(s) change? |
5864 | if (camera) | 5865 | if (camera) |
5866 | { | ||
5867 | m_thisAgentUpdateArgs.CameraAtAxis = x.CameraAtAxis; | ||
5868 | m_thisAgentUpdateArgs.CameraCenter = x.CameraCenter; | ||
5869 | m_thisAgentUpdateArgs.CameraLeftAxis = x.CameraLeftAxis; | ||
5870 | m_thisAgentUpdateArgs.CameraUpAxis = x.CameraUpAxis; | ||
5871 | |||
5872 | UpdateAgent handlerAgentCameraUpdate = OnAgentCameraUpdate; | ||
5873 | |||
5865 | if (handlerAgentCameraUpdate != null) | 5874 | if (handlerAgentCameraUpdate != null) |
5866 | handlerAgentCameraUpdate(this, m_thisAgentUpdateArgs); | 5875 | handlerAgentCameraUpdate(this, m_thisAgentUpdateArgs); |
5867 | 5876 | ||
5868 | handlerAgentUpdate = null; | 5877 | handlerAgentCameraUpdate = null; |
5869 | handlerPreAgentUpdate = null; | 5878 | } |
5870 | handlerAgentCameraUpdate = null; | ||
5871 | 5879 | ||
5872 | PacketPool.Instance.ReturnPacket(packet); | 5880 | PacketPool.Instance.ReturnPacket(packet); |
5873 | 5881 | ||