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
parent
088ed68562
commit
aff38e2dd2
|
@ -122,6 +122,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
private bool m_useFlySlow = false;
|
||||
private bool m_usePreJump = false;
|
||||
|
||||
private float m_speedModifier = 1.0f;
|
||||
|
||||
private Quaternion m_bodyRot= Quaternion.Identity;
|
||||
|
||||
public bool IsRestrictedToRegion;
|
||||
|
@ -563,6 +565,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
set { m_inTransit = value; }
|
||||
}
|
||||
|
||||
public float SpeedModifier
|
||||
{
|
||||
get { return m_speedModifier; }
|
||||
set { m_speedModifier = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor(s)
|
||||
|
@ -2224,7 +2232,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Vector3 direc = vec * rotation;
|
||||
direc.Normalize();
|
||||
|
||||
direc *= 0.03f * 128f;
|
||||
direc *= 0.03f * 128f * m_speedModifier;
|
||||
if (m_physicsActor.Flying)
|
||||
{
|
||||
direc *= 4;
|
||||
|
|
Loading…
Reference in New Issue