diff options
author | UbitUmarov | 2016-07-03 10:22:14 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-03 10:22:14 +0100 |
commit | a443dcce8974a8ed197ad144599050f75e6aee25 (patch) | |
tree | 2823b6a04579f66b20e4dfa07e24c8e9e6c377e2 /OpenSim | |
parent | dont send bad profiles to viewer (diff) | |
download | opensim-SC-a443dcce8974a8ed197ad144599050f75e6aee25.zip opensim-SC-a443dcce8974a8ed197ad144599050f75e6aee25.tar.gz opensim-SC-a443dcce8974a8ed197ad144599050f75e6aee25.tar.bz2 opensim-SC-a443dcce8974a8ed197ad144599050f75e6aee25.tar.xz |
try to place avatars on a nicer location, when they arrive into a banned parcel
Diffstat (limited to 'OpenSim')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 13 |
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; |