Make SIGNIFICANT_MOVEMENT SP constant a top-level property so that other classes can use it.
parent
7f6f100c5a
commit
fc64cc2439
|
@ -89,6 +89,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static readonly Vector3 SIT_TARGET_ADJUSTMENT = new Vector3(0.1f, 0.0f, 0.3f);
|
private static readonly Vector3 SIT_TARGET_ADJUSTMENT = new Vector3(0.1f, 0.0f, 0.3f);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Movement updates for agents in neighboring regions are sent directly to clients.
|
||||||
|
/// This value only affects how often agent positions are sent to neighbor regions
|
||||||
|
/// for things such as distance-based update prioritization
|
||||||
|
/// </summary>
|
||||||
|
public static readonly float SIGNIFICANT_MOVEMENT = 2.0f;
|
||||||
|
|
||||||
public UUID currentParcelUUID = UUID.Zero;
|
public UUID currentParcelUUID = UUID.Zero;
|
||||||
|
|
||||||
private ISceneViewer m_sceneViewer;
|
private ISceneViewer m_sceneViewer;
|
||||||
|
@ -2718,11 +2725,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected void CheckForSignificantMovement()
|
protected void CheckForSignificantMovement()
|
||||||
{
|
{
|
||||||
// Movement updates for agents in neighboring regions are sent directly to clients.
|
|
||||||
// This value only affects how often agent positions are sent to neighbor regions
|
|
||||||
// for things such as distance-based update prioritization
|
|
||||||
const float SIGNIFICANT_MOVEMENT = 2.0f;
|
|
||||||
|
|
||||||
if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > SIGNIFICANT_MOVEMENT)
|
if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > SIGNIFICANT_MOVEMENT)
|
||||||
{
|
{
|
||||||
posLastSignificantMove = AbsolutePosition;
|
posLastSignificantMove = AbsolutePosition;
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
// presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget, distanceToTarget);
|
// presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget, distanceToTarget);
|
||||||
|
|
||||||
// Check the error term of the current position in relation to the target position
|
// Check the error term of the current position in relation to the target position
|
||||||
if (distanceToTarget <= 2)
|
if (distanceToTarget <= ScenePresence.SIGNIFICANT_MOVEMENT)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[NPC MODULE]: Stopping movement of npc {0} {1}", presence.Name, presence.UUID);
|
// m_log.DebugFormat("[NPC MODULE]: Stopping movement of npc {0} {1}", presence.Name, presence.UUID);
|
||||||
// We are close enough to the target for now
|
// We are close enough to the target for now
|
||||||
|
|
Loading…
Reference in New Issue