aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authordahlia2013-01-10 20:21:18 -0800
committerdahlia2013-01-10 20:21:18 -0800
commit72cc94cfbc16515515d33e4f130d3ee5f2802866 (patch)
tree2531fe6b3ce8d08668e5e4d5684456b23239642d /OpenSim
parentImplement a workaround solution for saving manual script state changes by the... (diff)
downloadopensim-SC_OLD-72cc94cfbc16515515d33e4f130d3ee5f2802866.zip
opensim-SC_OLD-72cc94cfbc16515515d33e4f130d3ee5f2802866.tar.gz
opensim-SC_OLD-72cc94cfbc16515515d33e4f130d3ee5f2802866.tar.bz2
opensim-SC_OLD-72cc94cfbc16515515d33e4f130d3ee5f2802866.tar.xz
add some sanity checking to HandleAgentRequestSit handler
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 504df40..a8517e6 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -6428,8 +6428,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6428 6428
6429 AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; 6429 AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit;
6430 if (handlerAgentRequestSit != null) 6430 if (handlerAgentRequestSit != null)
6431 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, 6431 if (!(agentRequestSit.AgentData == null
6432 agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); 6432 || agentRequestSit.TargetObject == null
6433 || agentRequestSit.TargetObject.TargetID == null
6434 || agentRequestSit.TargetObject.Offset == null))
6435 {
6436 var sp = m_scene.GetScenePresence(agentRequestSit.AgentData.AgentID);
6437 if (sp == null || sp.ParentID != 0) // ignore packet if agent is already sitting
6438 return true;
6439
6440 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
6441 agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
6442 }
6433 } 6443 }
6434 return true; 6444 return true;
6435 } 6445 }