fix object updates throttle for scripts doing motion by direct change of position. Most this scripts are bad, making no use of viewers interpolators. Tanks lotek.
parent
f921ad005f
commit
4293b2cb3c
|
@ -810,7 +810,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
// If this is a linkset, we don't want the physics engine mucking up our group position here.
|
// If this is a linkset, we don't want the physics engine mucking up our group position here.
|
||||||
PhysicsActor actor = PhysActor;
|
PhysicsActor actor = PhysActor;
|
||||||
if (ParentID == 0)
|
if (_parentID == 0)
|
||||||
{
|
{
|
||||||
if (actor != null)
|
if (actor != null)
|
||||||
m_groupPosition = actor.Position;
|
m_groupPosition = actor.Position;
|
||||||
|
@ -839,7 +839,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Root prim actually goes at Position
|
// Root prim actually goes at Position
|
||||||
if (ParentID == 0)
|
if (_parentID == 0)
|
||||||
{
|
{
|
||||||
actor.Position = value;
|
actor.Position = value;
|
||||||
}
|
}
|
||||||
|
@ -881,7 +881,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ParentGroup.InvalidBoundsRadius();
|
ParentGroup.InvalidBoundsRadius();
|
||||||
|
|
||||||
PhysicsActor actor = PhysActor;
|
PhysicsActor actor = PhysActor;
|
||||||
if (ParentID != 0 && actor != null)
|
if (_parentID != 0 && actor != null)
|
||||||
{
|
{
|
||||||
actor.Position = GetWorldPosition();
|
actor.Position = GetWorldPosition();
|
||||||
actor.Orientation = GetWorldRotation();
|
actor.Orientation = GetWorldRotation();
|
||||||
|
@ -941,7 +941,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
PhysicsActor actor = PhysActor;
|
PhysicsActor actor = PhysActor;
|
||||||
// If this is a root of a linkset, the real rotation is what the physics engine thinks.
|
// If this is a root of a linkset, the real rotation is what the physics engine thinks.
|
||||||
// If not a root prim, the offset rotation is computed by SOG and is relative to the root.
|
// If not a root prim, the offset rotation is computed by SOG and is relative to the root.
|
||||||
if (ParentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null)
|
if (_parentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null)
|
||||||
m_rotationOffset = actor.Orientation;
|
m_rotationOffset = actor.Orientation;
|
||||||
|
|
||||||
return m_rotationOffset;
|
return m_rotationOffset;
|
||||||
|
@ -958,7 +958,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Root prim gets value directly
|
// Root prim gets value directly
|
||||||
if (ParentID == 0)
|
if (_parentID == 0)
|
||||||
{
|
{
|
||||||
actor.Orientation = value;
|
actor.Orientation = value;
|
||||||
//m_log.Info("[PART]: RO1:" + actor.Orientation.ToString());
|
//m_log.Info("[PART]: RO1:" + actor.Orientation.ToString());
|
||||||
|
@ -1259,6 +1259,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
if (_parentID == 0)
|
||||||
|
return GroupPosition;
|
||||||
|
|
||||||
return GroupPosition + (m_offsetPosition * ParentGroup.RootPart.RotationOffset);
|
return GroupPosition + (m_offsetPosition * ParentGroup.RootPart.RotationOffset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2424,7 +2427,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
|
PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
|
||||||
PhysActor.OnOutOfBounds += PhysicsOutOfBounds;
|
PhysActor.OnOutOfBounds += PhysicsOutOfBounds;
|
||||||
|
|
||||||
if (ParentID != 0 && ParentID != LocalId)
|
if (_parentID != 0 && _parentID != LocalId)
|
||||||
{
|
{
|
||||||
PhysicsActor parentPa = ParentGroup.RootPart.PhysActor;
|
PhysicsActor parentPa = ParentGroup.RootPart.PhysActor;
|
||||||
|
|
||||||
|
@ -3075,7 +3078,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//ParentGroup.RootPart.m_groupPosition = newpos;
|
//ParentGroup.RootPart.m_groupPosition = newpos;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if (pa != null && ParentID != 0 && ParentGroup != null)
|
if (pa != null && _parentID != 0 && ParentGroup != null)
|
||||||
{
|
{
|
||||||
// Special case where a child object is requesting property updates.
|
// Special case where a child object is requesting property updates.
|
||||||
// This happens when linksets are modified to use flexible links rather than
|
// This happens when linksets are modified to use flexible links rather than
|
||||||
|
@ -3359,7 +3362,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Update the "last" values
|
// Update the "last" values
|
||||||
m_lastPosition = OffsetPosition;
|
m_lastPosition = AbsolutePosition;
|
||||||
m_lastRotation = RotationOffset;
|
m_lastRotation = RotationOffset;
|
||||||
m_lastVelocity = Velocity;
|
m_lastVelocity = Velocity;
|
||||||
m_lastAcceleration = Acceleration;
|
m_lastAcceleration = Acceleration;
|
||||||
|
@ -3378,7 +3381,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Update the "last" values
|
// Update the "last" values
|
||||||
m_lastPosition = OffsetPosition;
|
m_lastPosition = AbsolutePosition;
|
||||||
m_lastRotation = RotationOffset;
|
m_lastRotation = RotationOffset;
|
||||||
m_lastVelocity = Velocity;
|
m_lastVelocity = Velocity;
|
||||||
m_lastAcceleration = Acceleration;
|
m_lastAcceleration = Acceleration;
|
||||||
|
@ -3488,7 +3491,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
vz < VELOCITY_TOLERANCE
|
vz < VELOCITY_TOLERANCE
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
|
if(!AbsolutePosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (vx < 1e-4 &&
|
if (vx < 1e-4 &&
|
||||||
|
@ -3534,7 +3537,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
|
|
||||||
// Update the "last" values
|
// Update the "last" values
|
||||||
m_lastPosition = OffsetPosition;
|
m_lastPosition = AbsolutePosition;
|
||||||
m_lastRotation = RotationOffset;
|
m_lastRotation = RotationOffset;
|
||||||
m_lastVelocity = curvel;
|
m_lastVelocity = curvel;
|
||||||
m_lastAcceleration = curacc;
|
m_lastAcceleration = curacc;
|
||||||
|
@ -3567,7 +3570,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ClearUpdateSchedule();
|
ClearUpdateSchedule();
|
||||||
|
|
||||||
// Update the "last" values
|
// Update the "last" values
|
||||||
m_lastPosition = OffsetPosition;
|
m_lastPosition = AbsolutePosition;
|
||||||
m_lastRotation = RotationOffset;
|
m_lastRotation = RotationOffset;
|
||||||
m_lastVelocity = Velocity;
|
m_lastVelocity = Velocity;
|
||||||
m_lastAcceleration = Acceleration;
|
m_lastAcceleration = Acceleration;
|
||||||
|
@ -3588,7 +3591,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ClearUpdateSchedule();
|
ClearUpdateSchedule();
|
||||||
|
|
||||||
// Update the "last" values
|
// Update the "last" values
|
||||||
m_lastPosition = OffsetPosition;
|
m_lastPosition = AbsolutePosition;
|
||||||
m_lastRotation = RotationOffset;
|
m_lastRotation = RotationOffset;
|
||||||
m_lastVelocity = Velocity;
|
m_lastVelocity = Velocity;
|
||||||
m_lastAcceleration = Acceleration;
|
m_lastAcceleration = Acceleration;
|
||||||
|
@ -4910,7 +4913,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
pa.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
|
pa.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
|
||||||
pa.OnOutOfBounds += PhysicsOutOfBounds;
|
pa.OnOutOfBounds += PhysicsOutOfBounds;
|
||||||
|
|
||||||
if (ParentID != 0 && ParentID != LocalId)
|
if (_parentID != 0 && _parentID != LocalId)
|
||||||
{
|
{
|
||||||
PhysicsActor parentPa = ParentGroup.RootPart.PhysActor;
|
PhysicsActor parentPa = ParentGroup.RootPart.PhysActor;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue