extract ground sit code into SP.HandleAgentSitOnGround() for consistency with other sitting code.
parent
6ce3daff94
commit
a3052e40ad
|
@ -163,7 +163,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
private uint m_requestedSitTargetID;
|
private uint m_requestedSitTargetID;
|
||||||
private UUID m_requestedSitTargetUUID;
|
private UUID m_requestedSitTargetUUID;
|
||||||
public bool SitGround = false;
|
|
||||||
|
/// <summary>
|
||||||
|
/// Are we sitting on the ground?
|
||||||
|
/// </summary>
|
||||||
|
public bool SitGround { get; private set; }
|
||||||
|
|
||||||
private SendCourseLocationsMethod m_sendCourseLocationsMethod;
|
private SendCourseLocationsMethod m_sendCourseLocationsMethod;
|
||||||
|
|
||||||
|
@ -1410,17 +1414,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0)
|
if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0)
|
||||||
{
|
HandleAgentSitOnGround();
|
||||||
m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.
|
|
||||||
Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
|
|
||||||
|
|
||||||
// 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");
|
|
||||||
SitGround = true;
|
|
||||||
RemoveFromPhysicalScene();
|
|
||||||
}
|
|
||||||
|
|
||||||
// In the future, these values might need to go global.
|
// In the future, these values might need to go global.
|
||||||
// Here's where you get them.
|
// Here's where you get them.
|
||||||
|
@ -2314,6 +2308,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SendAvatarDataToAllAgents();
|
SendAvatarDataToAllAgents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void HandleAgentSitOnGround()
|
||||||
|
{
|
||||||
|
m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.
|
||||||
|
Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
|
||||||
|
|
||||||
|
// 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");
|
||||||
|
SitGround = true;
|
||||||
|
RemoveFromPhysicalScene();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event handler for the 'Always run' setting on the client
|
/// Event handler for the 'Always run' setting on the client
|
||||||
/// Tells the physics plugin to increase speed of movement.
|
/// Tells the physics plugin to increase speed of movement.
|
||||||
|
|
Loading…
Reference in New Issue