tell viewers to autopilot on sit, but bypass it, so camera does get set

master
UbitUmarov 2020-01-20 18:25:59 +00:00
parent 0e1e247289
commit 0bd102a397
1 changed files with 11 additions and 6 deletions

View File

@ -3424,7 +3424,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
ControllingClient.SendSitResponse( ControllingClient.SendSitResponse(
part.ParentGroup.UUID, offset, sitOrientation, false, cameraAtOffset, cameraEyeOffset, forceMouselook); part.ParentGroup.UUID, offset, sitOrientation, true, cameraAtOffset, cameraEyeOffset, forceMouselook);
m_requestedSitTargetUUID = part.UUID; m_requestedSitTargetUUID = part.UUID;
@ -3432,8 +3432,8 @@ namespace OpenSim.Region.Framework.Scenes
// Moved here to avoid a race with default sit anim // Moved here to avoid a race with default sit anim
// The script event needs to be raised after the default sit anim is set. // The script event needs to be raised after the default sit anim is set.
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); //part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
m_scene.EventManager.TriggerParcelPrimCountTainted(); // update select/ sat on //m_scene.EventManager.TriggerParcelPrimCountTainted(); // update select/ sat on
} }
} }
@ -3572,7 +3572,7 @@ namespace OpenSim.Region.Framework.Scenes
m_pos = offset; m_pos = offset;
ControllingClient.SendSitResponse( ControllingClient.SendSitResponse(
part.ParentGroup.UUID, offset, Orientation, false, cameraAtOffset, cameraEyeOffset, forceMouselook); part.ParentGroup.UUID, offset, Orientation, true, cameraAtOffset, cameraEyeOffset, forceMouselook);
SendAvatarDataToAllAgents(); SendAvatarDataToAllAgents();
@ -3591,6 +3591,9 @@ namespace OpenSim.Region.Framework.Scenes
if (IsChildAgent) if (IsChildAgent)
return; return;
if(SitGround || IsSatOnObject)
return;
SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
if (part != null) if (part != null)
@ -3735,7 +3738,9 @@ namespace OpenSim.Region.Framework.Scenes
} }
// Animator.TrySetMovementAnimation(sitAnimation); // Animator.TrySetMovementAnimation(sitAnimation);
Animator.SetMovementAnimations("SIT"); Animator.SetMovementAnimations("SIT");
TriggerScenePresenceUpdated(); // TriggerScenePresenceUpdated();
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
m_scene.EventManager.TriggerParcelPrimCountTainted(); // update select/ sat on
} }
} }