cleanup a bit presence CheckForBorderCrossing removing dead code
parent
d64a50ac9b
commit
237075ce21
|
@ -3485,8 +3485,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentID != 0 || PhysicsActor == null || ParentUUID != UUID.Zero)
|
if (ParentID != 0 || PhysicsActor == null || ParentUUID != UUID.Zero)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!IsInTransit)
|
if (IsInTransit)
|
||||||
{
|
return;
|
||||||
|
|
||||||
Vector3 pos2 = AbsolutePosition;
|
Vector3 pos2 = AbsolutePosition;
|
||||||
Vector3 vel = Velocity;
|
Vector3 vel = Velocity;
|
||||||
int neighbor = 0;
|
int neighbor = 0;
|
||||||
|
@ -3497,11 +3498,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
pos2.Y = pos2.Y + (vel.Y * timeStep);
|
pos2.Y = pos2.Y + (vel.Y * timeStep);
|
||||||
pos2.Z = pos2.Z + (vel.Z * timeStep);
|
pos2.Z = pos2.Z + (vel.Z * timeStep);
|
||||||
|
|
||||||
if (!IsInTransit)
|
|
||||||
{
|
// m_log.DebugFormat(
|
||||||
// m_log.DebugFormat(
|
// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}",
|
||||||
// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}",
|
// pos2, Name, Scene.Name);
|
||||||
// pos2, Name, Scene.Name);
|
|
||||||
|
|
||||||
// Checks if where it's headed exists a region
|
// Checks if where it's headed exists a region
|
||||||
bool needsTransit = false;
|
bool needsTransit = false;
|
||||||
|
@ -3574,7 +3574,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Velocity = Vector3.Zero;
|
Velocity = Vector3.Zero;
|
||||||
AbsolutePosition = pos;
|
AbsolutePosition = pos;
|
||||||
|
|
||||||
// m_log.DebugFormat("[SCENE PRESENCE]: Prevented flyoff for {0} at {1}", Name, AbsolutePosition);
|
// m_log.DebugFormat("[SCENE PRESENCE]: Prevented flyoff for {0} at {1}", Name, AbsolutePosition);
|
||||||
|
|
||||||
AddToPhysicalScene(isFlying);
|
AddToPhysicalScene(isFlying);
|
||||||
}
|
}
|
||||||
|
@ -3605,20 +3605,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// This constant has been inferred from experimentation
|
|
||||||
// I'm not sure what this value should be, so I tried a few values.
|
|
||||||
timeStep = 0.04f;
|
|
||||||
pos2 = AbsolutePosition;
|
|
||||||
pos2.X = pos2.X + (vel.X * timeStep);
|
|
||||||
pos2.Y = pos2.Y + (vel.Y * timeStep);
|
|
||||||
// Don't touch the Z
|
|
||||||
m_pos = pos2;
|
|
||||||
m_log.DebugFormat("[SCENE PRESENCE]: In transit m_pos={0}", m_pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue