Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
commit
d068468f53
|
@ -631,6 +631,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (triggerScriptEvent)
|
if (triggerScriptEvent)
|
||||||
part.TriggerScriptChangedEvent(Changed.POSITION);
|
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)
|
if (!m_dupeInProgress)
|
||||||
{
|
{
|
||||||
foreach (ScenePresence av in m_linkedAvatars)
|
foreach (ScenePresence av in m_linkedAvatars)
|
||||||
|
@ -640,12 +648,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
Vector3 offset = p.GetWorldPosition() - av.ParentPosition;
|
Vector3 offset = p.GetWorldPosition() - av.ParentPosition;
|
||||||
av.AbsolutePosition += offset;
|
av.AbsolutePosition += offset;
|
||||||
av.ParentPosition = p.GetWorldPosition(); //ParentPosition gets cleared by AbsolutePosition
|
// av.ParentPosition = p.GetWorldPosition(); //ParentPosition gets cleared by AbsolutePosition
|
||||||
av.SendAvatarDataToAllAgents();
|
av.SendAvatarDataToAllAgents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
//if (m_rootPart.PhysActor != null)
|
//if (m_rootPart.PhysActor != null)
|
||||||
//{
|
//{
|
||||||
//m_rootPart.PhysActor.Position =
|
//m_rootPart.PhysActor.Position =
|
||||||
|
@ -676,8 +684,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (agent.ParentUUID != UUID.Zero)
|
if (agent.ParentUUID != UUID.Zero)
|
||||||
{
|
{
|
||||||
agent.ParentPart = null;
|
agent.ParentPart = null;
|
||||||
agent.ParentPosition = Vector3.Zero;
|
// agent.ParentPosition = Vector3.Zero;
|
||||||
// agent.ParentUUID = UUID.Zero;
|
// agent.ParentUUID = UUID.Zero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3752,7 +3760,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else
|
else
|
||||||
// ugly rotation update of all parts
|
// ugly rotation update of all parts
|
||||||
{
|
{
|
||||||
group.AbsolutePosition = AbsolutePosition;
|
group.ResetChildPrimPhysicsPositions();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,7 +433,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
get { return (IClientCore)ControllingClient; }
|
get { return (IClientCore)ControllingClient; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 ParentPosition { get; set; }
|
// public Vector3 ParentPosition { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Position of this avatar relative to the region the avatar is in
|
/// Position of this avatar relative to the region the avatar is in
|
||||||
|
@ -491,7 +491,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentID == 0)
|
if (ParentID == 0)
|
||||||
{
|
{
|
||||||
m_pos = value;
|
m_pos = value;
|
||||||
ParentPosition = Vector3.Zero;
|
// ParentPosition = Vector3.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
//m_log.DebugFormat(
|
//m_log.DebugFormat(
|
||||||
|
@ -857,11 +857,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
part.ParentGroup.AddAvatar(UUID);
|
part.ParentGroup.AddAvatar(UUID);
|
||||||
if (part.SitTargetPosition != Vector3.Zero)
|
if (part.SitTargetPosition != Vector3.Zero)
|
||||||
part.SitTargetAvatar = UUID;
|
part.SitTargetAvatar = UUID;
|
||||||
ParentPosition = part.GetWorldPosition();
|
// ParentPosition = part.GetWorldPosition();
|
||||||
ParentID = part.LocalId;
|
ParentID = part.LocalId;
|
||||||
ParentPart = part;
|
ParentPart = part;
|
||||||
m_pos = m_prevSitOffset;
|
m_pos = m_prevSitOffset;
|
||||||
pos = ParentPosition;
|
// pos = ParentPosition;
|
||||||
|
pos = part.GetWorldPosition();
|
||||||
}
|
}
|
||||||
ParentUUID = UUID.Zero;
|
ParentUUID = UUID.Zero;
|
||||||
|
|
||||||
|
@ -1933,11 +1934,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
part.SitTargetAvatar = UUID.Zero;
|
part.SitTargetAvatar = UUID.Zero;
|
||||||
|
|
||||||
part.ParentGroup.DeleteAvatar(UUID);
|
part.ParentGroup.DeleteAvatar(UUID);
|
||||||
ParentPosition = part.GetWorldPosition();
|
// ParentPosition = part.GetWorldPosition();
|
||||||
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
|
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
|
||||||
|
|
||||||
m_pos += ParentPosition + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight);
|
// m_pos += ParentPosition + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight);
|
||||||
ParentPosition = Vector3.Zero;
|
// ParentPosition = Vector3.Zero;
|
||||||
|
m_pos += part.GetWorldPosition() + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight);
|
||||||
|
|
||||||
ParentID = 0;
|
ParentID = 0;
|
||||||
ParentPart = null;
|
ParentPart = null;
|
||||||
|
@ -2388,13 +2390,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// m_pos = sitTargetPos + SIT_TARGET_ADJUSTMENT - sitOffset;
|
// m_pos = sitTargetPos + SIT_TARGET_ADJUSTMENT - sitOffset;
|
||||||
Rotation = sitTargetOrient;
|
Rotation = sitTargetOrient;
|
||||||
ParentPosition = part.AbsolutePosition;
|
// ParentPosition = part.AbsolutePosition;
|
||||||
part.ParentGroup.AddAvatar(UUID);
|
part.ParentGroup.AddAvatar(UUID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_pos -= part.AbsolutePosition;
|
m_pos -= part.AbsolutePosition;
|
||||||
ParentPosition = part.AbsolutePosition;
|
// ParentPosition = part.AbsolutePosition;
|
||||||
part.ParentGroup.AddAvatar(UUID);
|
part.ParentGroup.AddAvatar(UUID);
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
|
|
Loading…
Reference in New Issue