update the last information sent in terse updates where they are sent to all
clients and not only on Scheduled sendsavinationmerge
parent
819f4b338d
commit
d7f0bf04f6
|
@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public bool IsRoot
|
public bool IsRoot
|
||||||
{
|
{
|
||||||
get { return ParentGroup.RootPart == this; }
|
get { return Object.ReferenceEquals(ParentGroup.RootPart, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -319,7 +319,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
protected Vector3 m_lastVelocity;
|
protected Vector3 m_lastVelocity;
|
||||||
protected Vector3 m_lastAcceleration;
|
protected Vector3 m_lastAcceleration;
|
||||||
protected Vector3 m_lastAngularVelocity;
|
protected Vector3 m_lastAngularVelocity;
|
||||||
protected int m_lastTerseSent;
|
protected int m_lastUpdateSentTime;
|
||||||
protected float m_buoyancy = 0.0f;
|
protected float m_buoyancy = 0.0f;
|
||||||
protected Vector3 m_force;
|
protected Vector3 m_force;
|
||||||
protected Vector3 m_torque;
|
protected Vector3 m_torque;
|
||||||
|
@ -3198,6 +3198,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentGroup == null)
|
if (ParentGroup == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Update the "last" values
|
||||||
|
m_lastPosition = OffsetPosition;
|
||||||
|
m_lastRotation = RotationOffset;
|
||||||
|
m_lastVelocity = Velocity;
|
||||||
|
m_lastAcceleration = Acceleration;
|
||||||
|
m_lastAngularVelocity = AngularVelocity;
|
||||||
|
m_lastUpdateSentTime = Environment.TickCount;
|
||||||
|
|
||||||
ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
||||||
{
|
{
|
||||||
SendFullUpdate(avatar.ControllingClient);
|
SendFullUpdate(avatar.ControllingClient);
|
||||||
|
@ -3271,17 +3279,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) ||
|
Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) ||
|
||||||
!AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
|
!AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
|
||||||
!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
||||||
Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
|
Environment.TickCount - m_lastUpdateSentTime > TIME_MS_TOLERANCE)
|
||||||
{
|
{
|
||||||
SendTerseUpdateToAllClients();
|
SendTerseUpdateToAllClients();
|
||||||
|
|
||||||
// Update the "last" values
|
|
||||||
m_lastPosition = OffsetPosition;
|
|
||||||
m_lastRotation = RotationOffset;
|
|
||||||
m_lastVelocity = Velocity;
|
|
||||||
m_lastAcceleration = Acceleration;
|
|
||||||
m_lastAngularVelocity = AngularVelocity;
|
|
||||||
m_lastTerseSent = Environment.TickCount;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3302,6 +3303,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentGroup == null || ParentGroup.Scene == null)
|
if (ParentGroup == null || ParentGroup.Scene == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Update the "last" values
|
||||||
|
m_lastPosition = OffsetPosition;
|
||||||
|
m_lastRotation = RotationOffset;
|
||||||
|
m_lastVelocity = Velocity;
|
||||||
|
m_lastAcceleration = Acceleration;
|
||||||
|
m_lastAngularVelocity = AngularVelocity;
|
||||||
|
m_lastUpdateSentTime = Environment.TickCount;
|
||||||
|
|
||||||
ParentGroup.Scene.ForEachClient(delegate(IClientAPI client)
|
ParentGroup.Scene.ForEachClient(delegate(IClientAPI client)
|
||||||
{
|
{
|
||||||
SendTerseUpdateToClient(client);
|
SendTerseUpdateToClient(client);
|
||||||
|
|
Loading…
Reference in New Issue