* Fixes Sitting on the ground.
parent
16a64c400b
commit
e6c71d6df6
|
@ -146,7 +146,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
|||
const float PREJUMP_DELAY = 0.25f;
|
||||
|
||||
#region Inputs
|
||||
|
||||
if (m_scenePresence.SitGround)
|
||||
{
|
||||
return "SIT_GROUND_CONSTRAINED";
|
||||
}
|
||||
AgentManager.ControlFlags controlFlags = (AgentManager.ControlFlags)m_scenePresence.AgentControlFlags;
|
||||
PhysicsActor actor = m_scenePresence.PhysicsActor;
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
private Vector3? m_forceToApply;
|
||||
private uint m_requestedSitTargetID;
|
||||
private UUID m_requestedSitTargetUUID;
|
||||
public bool SitGround = false;
|
||||
|
||||
private SendCourseLocationsMethod m_sendCourseLocationsMethod;
|
||||
|
||||
|
@ -1254,7 +1255,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// TODO: This doesn't prevent the user from walking yet.
|
||||
// Setting parent ID would fix this, if we knew what value
|
||||
// to use. Or we could add a m_isSitting variable.
|
||||
Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
|
||||
//Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
|
||||
SitGround = true;
|
||||
|
||||
}
|
||||
|
||||
// In the future, these values might need to go global.
|
||||
|
@ -1495,7 +1498,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
if (update_movementflag && ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) == 0) && (m_parentID == 0))
|
||||
if (update_movementflag && ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) == 0) && (m_parentID == 0) && !SitGround)
|
||||
Animator.UpdateMovementAnimations();
|
||||
|
||||
m_scene.EventManager.TriggerOnClientMovement(this);
|
||||
|
@ -1607,8 +1610,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
public void StandUp()
|
||||
{
|
||||
if (SitGround)
|
||||
SitGround = false;
|
||||
|
||||
if (m_parentID != 0)
|
||||
{
|
||||
m_log.Debug("StandupCode Executed");
|
||||
SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID);
|
||||
if (part != null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue