From 0bd102a397702ffa0e212629c66e89cff5e53cee Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 20 Jan 2020 18:25:59 +0000 Subject: [PATCH] tell viewers to autopilot on sit, but bypass it, so camera does get set --- .../Region/Framework/Scenes/ScenePresence.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3c1a88c119..f8f3c9cd1f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3424,7 +3424,7 @@ namespace OpenSim.Region.Framework.Scenes } ControllingClient.SendSitResponse( - part.ParentGroup.UUID, offset, sitOrientation, false, cameraAtOffset, cameraEyeOffset, forceMouselook); + part.ParentGroup.UUID, offset, sitOrientation, true, cameraAtOffset, cameraEyeOffset, forceMouselook); m_requestedSitTargetUUID = part.UUID; @@ -3432,8 +3432,8 @@ namespace OpenSim.Region.Framework.Scenes // Moved here to avoid a race with default sit anim // The script event needs to be raised after the default sit anim is set. - part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); - m_scene.EventManager.TriggerParcelPrimCountTainted(); // update select/ sat on + //part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); + //m_scene.EventManager.TriggerParcelPrimCountTainted(); // update select/ sat on } } @@ -3572,7 +3572,7 @@ namespace OpenSim.Region.Framework.Scenes m_pos = offset; ControllingClient.SendSitResponse( - part.ParentGroup.UUID, offset, Orientation, false, cameraAtOffset, cameraEyeOffset, forceMouselook); + part.ParentGroup.UUID, offset, Orientation, true, cameraAtOffset, cameraEyeOffset, forceMouselook); SendAvatarDataToAllAgents(); @@ -3591,7 +3591,10 @@ namespace OpenSim.Region.Framework.Scenes if (IsChildAgent) return; - SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); + if(SitGround || IsSatOnObject) + return; + + SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); if (part != null) { @@ -3735,7 +3738,9 @@ namespace OpenSim.Region.Framework.Scenes } // Animator.TrySetMovementAnimation(sitAnimation); Animator.SetMovementAnimations("SIT"); - TriggerScenePresenceUpdated(); +// TriggerScenePresenceUpdated(); + part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); + m_scene.EventManager.TriggerParcelPrimCountTainted(); // update select/ sat on } }