dont try to cross with avatars on DIE_AT_EDGE or RETURN_AT_EDGE sog
parent
0e4a9e35c7
commit
5269511339
|
@ -550,10 +550,18 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Vector3 newpos = Vector3.Zero;
|
||||
OpenSim.Services.Interfaces.GridRegion destination = null;
|
||||
|
||||
if (m_rootPart.DIE_AT_EDGE || m_rootPart.RETURN_AT_EDGE)
|
||||
{
|
||||
// this should delete the grp in this case
|
||||
m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_rootPart.KeyframeMotion != null)
|
||||
m_rootPart.KeyframeMotion.StartCrossingCheck();
|
||||
|
||||
bool canCross = true;
|
||||
|
||||
foreach (ScenePresence av in m_linkedAvatars)
|
||||
{
|
||||
// We need to cross these agents. First, let's find
|
||||
|
@ -644,7 +652,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
avsToCross.Clear();
|
||||
|
||||
}
|
||||
else
|
||||
// else
|
||||
// we need to do this on all fails
|
||||
|
||||
{
|
||||
if (m_rootPart.KeyframeMotion != null)
|
||||
m_rootPart.KeyframeMotion.CrossingFailure();
|
||||
|
@ -657,7 +667,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Vector3 oldp = AbsolutePosition;
|
||||
val.X = Util.Clamp<float>(oldp.X, 0.5f, (float)Constants.RegionSize - 0.5f);
|
||||
val.Y = Util.Clamp<float>(oldp.Y, 0.5f, (float)Constants.RegionSize - 0.5f);
|
||||
val.Z = Util.Clamp<float>(oldp.Z, 0.5f, 4096.0f);
|
||||
// dont crash land StarShips
|
||||
// val.Z = Util.Clamp<float>(oldp.Z, 0.5f, 4096.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue