Thank you kindly, MPallari, for a patch that:

This patch adds new property to ScenePresence: SpeedModifier. 
With this, one can modify avatars speed from region module 
or MRM script.
0.6.5-rc1
Charles Krinke 2009-04-19 17:19:31 +00:00
parent 088ed68562
commit aff38e2dd2
1 changed files with 9 additions and 1 deletions

View File

@ -122,6 +122,8 @@ namespace OpenSim.Region.Framework.Scenes
private bool m_useFlySlow = false; private bool m_useFlySlow = false;
private bool m_usePreJump = false; private bool m_usePreJump = false;
private float m_speedModifier = 1.0f;
private Quaternion m_bodyRot= Quaternion.Identity; private Quaternion m_bodyRot= Quaternion.Identity;
public bool IsRestrictedToRegion; public bool IsRestrictedToRegion;
@ -563,6 +565,12 @@ namespace OpenSim.Region.Framework.Scenes
set { m_inTransit = value; } set { m_inTransit = value; }
} }
public float SpeedModifier
{
get { return m_speedModifier; }
set { m_speedModifier = value; }
}
#endregion #endregion
#region Constructor(s) #region Constructor(s)
@ -2224,7 +2232,7 @@ namespace OpenSim.Region.Framework.Scenes
Vector3 direc = vec * rotation; Vector3 direc = vec * rotation;
direc.Normalize(); direc.Normalize();
direc *= 0.03f * 128f; direc *= 0.03f * 128f * m_speedModifier;
if (m_physicsActor.Flying) if (m_physicsActor.Flying)
{ {
direc *= 4; direc *= 4;