mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
*CHECK/REVIEW* comented out not used sp.ParentPosition. Comented out SOG.AbsolutePosition changing 'linked' avatars positions ( reason in code coment )
This commit is contained in:
@@ -631,6 +631,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (triggerScriptEvent)
|
||||
part.TriggerScriptChangedEvent(Changed.POSITION);
|
||||
}
|
||||
|
||||
/*
|
||||
This seems not needed and should not be needed:
|
||||
sp absolute position depends on sit part absolute position fixed above.
|
||||
sp ParentPosition is not used anywhere.
|
||||
Since presence is sitting, viewer considers it 'linked' to root prim, so it will move/rotate it
|
||||
Sending a extra packet with avatar position is not only bandwidth waste, but may cause jitter in viewers due to UPD nature.
|
||||
|
||||
if (!m_dupeInProgress)
|
||||
{
|
||||
foreach (ScenePresence av in m_linkedAvatars)
|
||||
@@ -640,12 +648,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
Vector3 offset = p.GetWorldPosition() - av.ParentPosition;
|
||||
av.AbsolutePosition += offset;
|
||||
av.ParentPosition = p.GetWorldPosition(); //ParentPosition gets cleared by AbsolutePosition
|
||||
// av.ParentPosition = p.GetWorldPosition(); //ParentPosition gets cleared by AbsolutePosition
|
||||
av.SendAvatarDataToAllAgents();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
//if (m_rootPart.PhysActor != null)
|
||||
//{
|
||||
//m_rootPart.PhysActor.Position =
|
||||
@@ -676,8 +684,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (agent.ParentUUID != UUID.Zero)
|
||||
{
|
||||
agent.ParentPart = null;
|
||||
agent.ParentPosition = Vector3.Zero;
|
||||
// agent.ParentUUID = UUID.Zero;
|
||||
// agent.ParentPosition = Vector3.Zero;
|
||||
// agent.ParentUUID = UUID.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3752,7 +3760,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
else
|
||||
// ugly rotation update of all parts
|
||||
{
|
||||
group.AbsolutePosition = AbsolutePosition;
|
||||
group.ResetChildPrimPhysicsPositions();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user