From aff38e2dd2b3debc75ed8bc8cd9a842900dcc6d4 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 19 Apr 2009 17:19:31 +0000 Subject: 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. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0eefd06..7300a24 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -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; -- cgit v1.1