aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-07-03 10:22:14 +0100
committerUbitUmarov2016-07-03 10:22:14 +0100
commita443dcce8974a8ed197ad144599050f75e6aee25 (patch)
tree2823b6a04579f66b20e4dfa07e24c8e9e6c377e2 /OpenSim/Region/Framework/Scenes/Scene.cs
parent dont send bad profiles to viewer (diff)
downloadopensim-SC_OLD-a443dcce8974a8ed197ad144599050f75e6aee25.zip
opensim-SC_OLD-a443dcce8974a8ed197ad144599050f75e6aee25.tar.gz
opensim-SC_OLD-a443dcce8974a8ed197ad144599050f75e6aee25.tar.bz2
opensim-SC_OLD-a443dcce8974a8ed197ad144599050f75e6aee25.tar.xz
try to place avatars on a nicer location, when they arrive into a banned parcel
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a75b460..5290abb 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4309,14 +4309,14 @@ namespace OpenSim.Region.Framework.Scenes
4309 if (banned || restricted) 4309 if (banned || restricted)
4310 { 4310 {
4311 ILandObject nearestParcel = GetNearestAllowedParcel(agentID, posX, posY); 4311 ILandObject nearestParcel = GetNearestAllowedParcel(agentID, posX, posY);
4312 Vector2? newPosition = null;
4312 if (nearestParcel != null) 4313 if (nearestParcel != null)
4313 { 4314 {
4314 //Move agent to nearest allowed 4315 //Move agent to nearest allowed
4315 Vector2 newPosition = GetParcelSafeCorner(nearestParcel); 4316// Vector2 newPosition = GetParcelSafeCorner(nearestParcel);
4316 posX = newPosition.X; 4317 newPosition = nearestParcel.GetNearestPoint(new Vector3(posX, posY,0));
4317 posY = newPosition.Y;
4318 } 4318 }
4319 else 4319 if(newPosition == null)
4320 { 4320 {
4321 if (banned) 4321 if (banned)
4322 { 4322 {
@@ -4329,6 +4329,11 @@ namespace OpenSim.Region.Framework.Scenes
4329 } 4329 }
4330 return false; 4330 return false;
4331 } 4331 }
4332 else
4333 {
4334 posX = newPosition.Value.X;
4335 posY = newPosition.Value.Y;
4336 }
4332 } 4337 }
4333 reason = ""; 4338 reason = "";
4334 return true; 4339 return true;