try to place avatars on a nicer location, when they arrive into a banned parcel
parent
a6ee06d630
commit
a443dcce89
|
@ -4309,14 +4309,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (banned || restricted)
|
if (banned || restricted)
|
||||||
{
|
{
|
||||||
ILandObject nearestParcel = GetNearestAllowedParcel(agentID, posX, posY);
|
ILandObject nearestParcel = GetNearestAllowedParcel(agentID, posX, posY);
|
||||||
|
Vector2? newPosition = null;
|
||||||
if (nearestParcel != null)
|
if (nearestParcel != null)
|
||||||
{
|
{
|
||||||
//Move agent to nearest allowed
|
//Move agent to nearest allowed
|
||||||
Vector2 newPosition = GetParcelSafeCorner(nearestParcel);
|
// Vector2 newPosition = GetParcelSafeCorner(nearestParcel);
|
||||||
posX = newPosition.X;
|
newPosition = nearestParcel.GetNearestPoint(new Vector3(posX, posY,0));
|
||||||
posY = newPosition.Y;
|
|
||||||
}
|
}
|
||||||
else
|
if(newPosition == null)
|
||||||
{
|
{
|
||||||
if (banned)
|
if (banned)
|
||||||
{
|
{
|
||||||
|
@ -4329,6 +4329,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
posX = newPosition.Value.X;
|
||||||
|
posY = newPosition.Value.Y;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
reason = "";
|
reason = "";
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue