diff options
Diffstat (limited to 'OpenSim')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f2a0c32..cf5705c 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4240,16 +4240,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
4240 | // CleanDroppedAttachments(); | 4240 | // CleanDroppedAttachments(); |
4241 | // } | 4241 | // } |
4242 | 4242 | ||
4243 | // Make sure avatar position is in the region (why it wouldn't be is a mystery but do sanity checking) | 4243 | if(teleportFlags != (uint) TPFlags.Default) |
4244 | if (acd.startpos.X < 0) | 4244 | { |
4245 | acd.startpos.X = 1f; | 4245 | // Make sure root avatar position is in the region |
4246 | else if (acd.startpos.X >= RegionInfo.RegionSizeX) | 4246 | if (acd.startpos.X < 0) |
4247 | acd.startpos.X = RegionInfo.RegionSizeX - 1f; | 4247 | acd.startpos.X = 1f; |
4248 | if (acd.startpos.Y < 0) | 4248 | else if (acd.startpos.X >= RegionInfo.RegionSizeX) |
4249 | acd.startpos.Y = 1f; | 4249 | acd.startpos.X = RegionInfo.RegionSizeX - 1f; |
4250 | else if (acd.startpos.Y >= RegionInfo.RegionSizeY) | 4250 | if (acd.startpos.Y < 0) |
4251 | acd.startpos.Y = RegionInfo.RegionSizeY - 1f; | 4251 | acd.startpos.Y = 1f; |
4252 | 4252 | else if (acd.startpos.Y >= RegionInfo.RegionSizeY) | |
4253 | acd.startpos.Y = RegionInfo.RegionSizeY - 1f; | ||
4254 | } | ||
4253 | // only check access, actual relocations will happen later on ScenePresence MakeRoot | 4255 | // only check access, actual relocations will happen later on ScenePresence MakeRoot |
4254 | // allow child agents creation | 4256 | // allow child agents creation |
4255 | if(!godlike && teleportFlags != (uint) TPFlags.Default) | 4257 | if(!godlike && teleportFlags != (uint) TPFlags.Default) |