Merge branch 'master' into careminster

avinationmerge
Melanie 2013-01-13 13:44:24 +00:00
commit 923e5df7ae
2 changed files with 13 additions and 3 deletions

View File

@ -6601,8 +6601,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;
}

View File

@ -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