Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
c0d280d948
|
@ -1731,18 +1731,23 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)
|
//if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
|
// If we somehow got here to updating the SOG and its root part is not scheduled for update,
|
||||||
|
// check to see if the physical position or rotation warrant an update.
|
||||||
if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
|
if (m_rootPart.UpdateFlag == UpdateRequired.NONE)
|
||||||
{
|
{
|
||||||
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
|
||||||
lastPhysGroupPos = AbsolutePosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
|
if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
|
||||||
{
|
{
|
||||||
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
||||||
lastPhysGroupRot = GroupRotation;
|
lastPhysGroupPos = AbsolutePosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
|
||||||
|
{
|
||||||
|
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
||||||
|
lastPhysGroupRot = GroupRotation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneObjectPart[] parts = m_parts.GetArray();
|
SceneObjectPart[] parts = m_parts.GetArray();
|
||||||
|
|
|
@ -2013,8 +2013,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
sitOrientation = avSitOrientation;
|
sitOrientation = avSitOrientation;
|
||||||
autopilot = false;
|
autopilot = false;
|
||||||
}
|
}
|
||||||
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
|
||||||
|
|
||||||
pos = part.AbsolutePosition + offset;
|
pos = part.AbsolutePosition + offset;
|
||||||
//if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
|
//if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
|
||||||
//{
|
//{
|
||||||
|
@ -2060,6 +2058,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_sitAtAutoTarget = autopilot;
|
m_sitAtAutoTarget = autopilot;
|
||||||
if (!autopilot)
|
if (!autopilot)
|
||||||
HandleAgentSit(remoteClient, UUID);
|
HandleAgentSit(remoteClient, UUID);
|
||||||
|
|
||||||
|
// Moved here to avoid a race with default sit anim
|
||||||
|
// The script event needs to be raised after the default sit anim is set.
|
||||||
|
if (part != null)
|
||||||
|
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset, string sitAnimation)
|
// public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset, string sitAnimation)
|
||||||
|
|
Loading…
Reference in New Issue