From 4f42bd150d79b61e6cb531d62c28015c2b448ee3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 2 May 2022 17:27:05 +0100 Subject: [PATCH] bug fix: do not let viewer agente update change rotation of sitting avatar (timing issue) --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7a25eee3e2..0241efdca7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2661,17 +2661,13 @@ namespace OpenSim.Region.Framework.Scenes ACFlags flags = RemoveIgnoredControls(allFlags, IgnoredControls); m_AgentControlFlags = flags; - if (AllowMovement) - Rotation = agentData.BodyRotation; - // Raycast from the avatar's head to the camera to see if there's anything blocking the view // this exclude checks may not be complete if (agentData.NeedsCameraCollision) checkCameraCollision(); - PhysicsActor actor = m_physActor; - // This will be the case if the agent is sitting on the groudn or on an object. + PhysicsActor actor = m_physActor; if (actor == null) { SendControlsToScripts((uint)allFlags); @@ -2680,6 +2676,8 @@ namespace OpenSim.Region.Framework.Scenes if (AllowMovement) { + Rotation = agentData.BodyRotation; + //m_log.DebugFormat("[SCENE PRESENCE]: Initial body rotation {0} for {1}", agentData.BodyRotation, Name); bool update_movementflag = false; bool DCFlagKeyPressed = false;