From 72cc94cfbc16515515d33e4f130d3ee5f2802866 Mon Sep 17 00:00:00 2001 From: dahlia Date: Thu, 10 Jan 2013 20:21:18 -0800 Subject: [PATCH 1/2] add some sanity checking to HandleAgentRequestSit handler --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 504df40e63..a8517e60f3 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 AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; if (handlerAgentRequestSit != null) - handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, - agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); + if (!(agentRequestSit.AgentData == null + || agentRequestSit.TargetObject == null + || agentRequestSit.TargetObject.TargetID == null + || agentRequestSit.TargetObject.Offset == null)) + { + var sp = m_scene.GetScenePresence(agentRequestSit.AgentData.AgentID); + if (sp == null || sp.ParentID != 0) // ignore packet if agent is already sitting + return true; + + handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, + agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); + } } return true; } From b592ec265b6f5928804baff868165f10eee6f5ed Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 11 Jan 2013 16:44:34 -0800 Subject: [PATCH 2/2] BulletSim: fix the 'No recognised physics mesh found ...' error spew by remembering that the last asset fetch failed until the simulator resets the shape parameters. --- OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 400d5d6b2e..8fd054f754 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs @@ -169,6 +169,7 @@ public sealed class BSPrim : BSPhysObject public override PrimitiveBaseShape Shape { set { BaseShape = value; + LastAssetBuildFailed = false; ForceBodyShapeRebuild(false); } } @@ -178,7 +179,6 @@ public sealed class BSPrim : BSPhysObject public override bool ForceBodyShapeRebuild(bool inTaintTime) { - LastAssetBuildFailed = false; PhysicsScene.TaintedObject(inTaintTime, "BSPrim.ForceBodyShapeRebuild", delegate() { _mass = CalculateMass(); // changing the shape changes the mass