don't break child agents start position

LSLKeyTest
UbitUmarov 2016-07-12 16:33:09 +01:00
parent e0878864e8
commit 5bb5eb4e37
1 changed files with 12 additions and 10 deletions

View File

@ -4240,7 +4240,9 @@ namespace OpenSim.Region.Framework.Scenes
// CleanDroppedAttachments();
// }
// Make sure avatar position is in the region (why it wouldn't be is a mystery but do sanity checking)
if(teleportFlags != (uint) TPFlags.Default)
{
// Make sure root avatar position is in the region
if (acd.startpos.X < 0)
acd.startpos.X = 1f;
else if (acd.startpos.X >= RegionInfo.RegionSizeX)
@ -4249,7 +4251,7 @@ namespace OpenSim.Region.Framework.Scenes
acd.startpos.Y = 1f;
else if (acd.startpos.Y >= RegionInfo.RegionSizeY)
acd.startpos.Y = RegionInfo.RegionSizeY - 1f;
}
// only check access, actual relocations will happen later on ScenePresence MakeRoot
// allow child agents creation
if(!godlike && teleportFlags != (uint) TPFlags.Default)