Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-11-10 22:58:24 +00:00
commit c0d280d948
2 changed files with 21 additions and 12 deletions

View File

@ -1731,18 +1731,23 @@ namespace OpenSim.Region.Framework.Scenes
//if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)
// return;
bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
// 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 (m_rootPart.UpdateFlag == UpdateRequired.NONE)
{
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
lastPhysGroupPos = AbsolutePosition;
}
bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
{
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
lastPhysGroupRot = GroupRotation;
if (UsePhysics && !AbsolutePosition.ApproxEquals(lastPhysGroupPos, 0.02f))
{
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
lastPhysGroupPos = AbsolutePosition;
}
if (UsePhysics && !GroupRotation.ApproxEquals(lastPhysGroupRot, 0.1f))
{
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
lastPhysGroupRot = GroupRotation;
}
}
SceneObjectPart[] parts = m_parts.GetArray();

View File

@ -2013,8 +2013,6 @@ namespace OpenSim.Region.Framework.Scenes
sitOrientation = avSitOrientation;
autopilot = false;
}
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
pos = part.AbsolutePosition + offset;
//if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
//{
@ -2060,6 +2058,12 @@ namespace OpenSim.Region.Framework.Scenes
m_sitAtAutoTarget = autopilot;
if (!autopilot)
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)