From f44c29effbd0d14427f288470aee028e9e09d6e3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 19 Oct 2014 15:51:12 +0100 Subject: try to fix propagation of seeds to all relevante regions --- OpenSim/Region/Framework/Scenes/Scene.cs | 8 +++++++- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 26 +++++++++++------------- 2 files changed, 19 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 829d4ce..4a6f72c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4558,8 +4558,14 @@ namespace OpenSim.Region.Framework.Scenes // a UseCircuitCode packet which in turn calls AddNewAgent which finally creates the ScenePresence. ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID); - if (sp != null) + if (sp != null) { + if (!sp.IsChildAgent) + { + m_log.WarnFormat("[SCENE]: Ignoring a child update on a root agent {0} {1} in {2}", + sp.Name, sp.UUID, Name); + return false; + } if (cAgentData.SessionID != sp.ControllingClient.SessionId) { m_log.WarnFormat( diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fbb18b7..405ad73 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1684,20 +1684,6 @@ namespace OpenSim.Region.Framework.Scenes return; } - // Prevent teleporting to an underground location - // (may crash client otherwise) - // - -/* this is done in MakeRootAgent - Vector3 pos = AbsolutePosition; - float ground = m_scene.GetGroundHeight(pos.X, pos.Y); - if (pos.Z < ground + 1.5f) - { - pos.Z = ground + 1.5f; - AbsolutePosition = pos; - } -*/ - m_log.DebugFormat("[CompleteMovement] WaitForUpdateAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); @@ -1904,7 +1890,9 @@ namespace OpenSim.Region.Framework.Scenes { IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface(); if (m_agentTransfer != null) + { m_agentTransfer.EnableChildAgents(this); + } } } @@ -4171,6 +4159,16 @@ namespace OpenSim.Region.Framework.Scenes if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) ControllingClient.SetChildAgentThrottle(cAgentData.Throttles); + if(cAgentData.ChildrenCapSeeds != null && cAgentData.ChildrenCapSeeds.Count >0) + { + if (Scene.CapsModule != null) + { + Scene.CapsModule.SetChildrenSeed(UUID, cAgentData.ChildrenCapSeeds); + } + + KnownRegions = cAgentData.ChildrenCapSeeds; + } + //cAgentData.AVHeight; //m_velocity = cAgentData.Velocity; } -- cgit v1.1