Fix AbsolutePosition for autopilot/sit.
parent
d3f33acc1a
commit
6df969894c
|
@ -463,7 +463,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
PhysicsActor actor = m_physicsActor;
|
PhysicsActor actor = m_physicsActor;
|
||||||
if (actor != null)
|
// if (actor != null)
|
||||||
|
if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting!
|
||||||
m_pos = actor.Position;
|
m_pos = actor.Position;
|
||||||
|
|
||||||
return m_parentPosition + m_pos;
|
return m_parentPosition + m_pos;
|
||||||
|
@ -484,6 +485,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_parentID == 0) // KF Do NOT update m_pos here if Av is sitting!
|
||||||
m_pos = value;
|
m_pos = value;
|
||||||
m_parentPosition = Vector3.Zero;
|
m_parentPosition = Vector3.Zero;
|
||||||
}
|
}
|
||||||
|
@ -1267,6 +1269,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_log.Error("[AVATAR]: NonFinite Avatar position detected... Reset Position. Mantis this please. Error #9999902");
|
m_log.Error("[AVATAR]: NonFinite Avatar position detected... Reset Position. Mantis this please. Error #9999902");
|
||||||
|
|
||||||
m_pos = m_LastFinitePos;
|
m_pos = m_LastFinitePos;
|
||||||
|
|
||||||
if (!m_pos.IsFinite())
|
if (!m_pos.IsFinite())
|
||||||
{
|
{
|
||||||
m_pos.X = 127f;
|
m_pos.X = 127f;
|
||||||
|
@ -1904,6 +1907,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
m_avUnscriptedSitPos = Vector3.Zero; // Zero = Sit on prim center
|
m_avUnscriptedSitPos = Vector3.Zero; // Zero = Sit on prim center
|
||||||
autopilotTarget = part.AbsolutePosition;
|
autopilotTarget = part.AbsolutePosition;
|
||||||
|
//Console.WriteLine("UsSmall autopilotTarget={0}", autopilotTarget);
|
||||||
}
|
}
|
||||||
else return; // occupied small
|
else return; // occupied small
|
||||||
} // end large/small
|
} // end large/small
|
||||||
|
@ -2281,6 +2285,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_bodyRot = sitTargetOrient;
|
m_bodyRot = sitTargetOrient;
|
||||||
m_parentPosition = part.AbsolutePosition;
|
m_parentPosition = part.AbsolutePosition;
|
||||||
part.IsOccupied = true;
|
part.IsOccupied = true;
|
||||||
|
Console.WriteLine("Scripted Sit ofset {0}", m_pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3348,6 +3353,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_callbackURI = cAgent.CallbackURI;
|
m_callbackURI = cAgent.CallbackURI;
|
||||||
|
|
||||||
m_pos = cAgent.Position;
|
m_pos = cAgent.Position;
|
||||||
|
|
||||||
m_velocity = cAgent.Velocity;
|
m_velocity = cAgent.Velocity;
|
||||||
m_CameraCenter = cAgent.Center;
|
m_CameraCenter = cAgent.Center;
|
||||||
//m_avHeight = cAgent.Size.Z;
|
//m_avHeight = cAgent.Size.Z;
|
||||||
|
|
Loading…
Reference in New Issue