diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 04d7a29480..616a8cd62d 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4066,6 +4066,40 @@ namespace OpenSim.Region.Framework.Scenes } } + 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) + acd.startpos.X = RegionInfo.RegionSizeX - 1f; + if (acd.startpos.Y < 0) + 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) + if (teleportFlags != (uint)TPFlags.Default) + { + bool checkTeleHub; + + // don't check hubs if via home or via lure + if ((teleportFlags & (uint)(TPFlags.ViaHome | TPFlags.ViaLure)) != 0) + checkTeleHub = false; + else + checkTeleHub = vialogin + || (TelehubAllowLandmarks == true ? false : ((teleportFlags & (uint)(TPFlags.ViaLandmark | TPFlags.ViaLocation)) != 0)); + + if (!CheckLandPositionAccess(acd.AgentID, true, checkTeleHub, acd.startpos, out reason)) + { + m_authenticateHandler.RemoveCircuit(acd); + return false; + } + } + // TODO: can we remove this lock? lock (m_newUserConnLock) { @@ -4185,51 +4219,12 @@ namespace OpenSim.Region.Framework.Scenes CacheUserName(null, acd); } - - //if (vialogin) - //{ - // CleanDroppedAttachments(); - //} - - 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) - acd.startpos.X = RegionInfo.RegionSizeX - 1f; - if (acd.startpos.Y < 0) - 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) - if (teleportFlags != (uint)TPFlags.Default) - { - bool checkTeleHub; - - // don't check hubs if via home or via lure - if ((teleportFlags & (uint)(TPFlags.ViaHome | TPFlags.ViaLure)) != 0) - checkTeleHub = false; - else - checkTeleHub = vialogin - || (TelehubAllowLandmarks == true ? false : ((teleportFlags & (uint)(TPFlags.ViaLandmark | TPFlags.ViaLocation)) != 0)); - - if (!CheckLandPositionAccess(acd.AgentID, true, checkTeleHub, acd.startpos, out reason)) - { - m_authenticateHandler.RemoveCircuit(acd); - return false; - } - } - if (CapsModule != null) { CapsModule.ActivateCaps(acd.circuitcode); } + return true; } diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 5ba7e78089..85c91811cb 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -960,20 +960,20 @@ namespace OpenSim.Region.Framework.Scenes // bad ugly - private static osUTF8 UUIDB = new osUTF8("UUID", true); - private static osUTF8 uuidB = new osUTF8("uuid", true); - private static osUTF8 SOPAnimsB = new osUTF8("SOPAnims", true); - private static osUTF8 CollisionSoundB = new osUTF8("CollisionSound", true); - private static osUTF8 SoundIDB = new osUTF8("SoundID", true); - private static osUTF8 SculptTextureB = new osUTF8("SculptTexture", true); - private static osUTF8 ExtraParamsB = new osUTF8("ExtraParams", true); - private static osUTF8 ParticleSystemB = new osUTF8("ParticleSystem", true); - private static osUTF8 TextureEntryB = new osUTF8("TextureEntry", true); - private static osUTF8 TaskInventoryB = new osUTF8("TaskInventory", true); - private static osUTF8 endTaskInventoryB = new osUTF8("/TaskInventory", true); - private static osUTF8 AssetIDB = new osUTF8("AssetID"); - private static osUTF8 texturesB = new osUTF8("textures", true); - private static osUTF8 parametersB = new osUTF8("parameters", true); + private static byte[] UUIDB = osUTF8.GetASCIIBytes("UUID"); + private static byte[] uuidB = osUTF8.GetASCIIBytes("uuid"); + private static byte[] SOPAnimsB = osUTF8.GetASCIIBytes("SOPAnims"); + private static byte[] CollisionSoundB = osUTF8.GetASCIIBytes("CollisionSound"); + private static byte[] SoundIDB = osUTF8.GetASCIIBytes("SoundID"); + private static byte[] SculptTextureB = osUTF8.GetASCIIBytes("SculptTexture"); + private static byte[] ExtraParamsB = osUTF8.GetASCIIBytes("ExtraParams"); + private static byte[] ParticleSystemB = osUTF8.GetASCIIBytes("ParticleSystem"); + private static byte[] TextureEntryB = osUTF8.GetASCIIBytes("TextureEntry"); + private static byte[] TaskInventoryB = osUTF8.GetASCIIBytes("TaskInventory"); + private static byte[] endTaskInventoryB = osUTF8.GetASCIIBytes("/TaskInventory"); + private static byte[] AssetIDB = osUTF8.GetASCIIBytes("AssetID"); + private static byte[] texturesB = osUTF8.GetASCIIBytes("textures"); + private static byte[] parametersB = osUTF8.GetASCIIBytes("parameters"); /// /// Get all the asset uuids associated with a given object. This includes both those directly associated with