* Fixes Sitting on the ground.

mysql-performance
Teravus Ovares (Dan Olivares) 2009-12-30 15:55:49 -05:00
parent 16a64c400b
commit e6c71d6df6
2 changed files with 13 additions and 3 deletions

View File

@ -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;

View File

@ -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)
{