mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user