aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorCharles Krinke2009-04-19 17:19:31 +0000
committerCharles Krinke2009-04-19 17:19:31 +0000
commitaff38e2dd2b3debc75ed8bc8cd9a842900dcc6d4 (patch)
tree1988739d0fb7ce8e113ce560b64ad2d81e492ccd /OpenSim/Region
parentFixes Mantis#3489. Thank you kindly, MCortez for a patch that: (diff)
downloadopensim-SC-aff38e2dd2b3debc75ed8bc8cd9a842900dcc6d4.zip
opensim-SC-aff38e2dd2b3debc75ed8bc8cd9a842900dcc6d4.tar.gz
opensim-SC-aff38e2dd2b3debc75ed8bc8cd9a842900dcc6d4.tar.bz2
opensim-SC-aff38e2dd2b3debc75ed8bc8cd9a842900dcc6d4.tar.xz
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.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs10
1 files changed, 9 insertions, 1 deletions
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
122 private bool m_useFlySlow = false; 122 private bool m_useFlySlow = false;
123 private bool m_usePreJump = false; 123 private bool m_usePreJump = false;
124 124
125 private float m_speedModifier = 1.0f;
126
125 private Quaternion m_bodyRot= Quaternion.Identity; 127 private Quaternion m_bodyRot= Quaternion.Identity;
126 128
127 public bool IsRestrictedToRegion; 129 public bool IsRestrictedToRegion;
@@ -563,6 +565,12 @@ namespace OpenSim.Region.Framework.Scenes
563 set { m_inTransit = value; } 565 set { m_inTransit = value; }
564 } 566 }
565 567
568 public float SpeedModifier
569 {
570 get { return m_speedModifier; }
571 set { m_speedModifier = value; }
572 }
573
566 #endregion 574 #endregion
567 575
568 #region Constructor(s) 576 #region Constructor(s)
@@ -2224,7 +2232,7 @@ namespace OpenSim.Region.Framework.Scenes
2224 Vector3 direc = vec * rotation; 2232 Vector3 direc = vec * rotation;
2225 direc.Normalize(); 2233 direc.Normalize();
2226 2234
2227 direc *= 0.03f * 128f; 2235 direc *= 0.03f * 128f * m_speedModifier;
2228 if (m_physicsActor.Flying) 2236 if (m_physicsActor.Flying)
2229 { 2237 {
2230 direc *= 4; 2238 direc *= 4;