aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2016-07-12 16:33:09 +0100
committerUbitUmarov2016-07-12 16:33:09 +0100
commit5bb5eb4e374922d172218c1d70af1fa7f8ad56d6 (patch)
tree15aa3ea0e77508ca2bea11e00ef823e97a767ef7
parentwork around missing information on child creation, hidding its effects with r... (diff)
downloadopensim-SC_OLD-5bb5eb4e374922d172218c1d70af1fa7f8ad56d6.zip
opensim-SC_OLD-5bb5eb4e374922d172218c1d70af1fa7f8ad56d6.tar.gz
opensim-SC_OLD-5bb5eb4e374922d172218c1d70af1fa7f8ad56d6.tar.bz2
opensim-SC_OLD-5bb5eb4e374922d172218c1d70af1fa7f8ad56d6.tar.xz
don't break child agents start position
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs22
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)