From fb900f60555a0b2cce1350b3726d38e210d52799 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 6 Apr 2009 18:02:12 +0000 Subject: Applying Intimidated's patch to fix anim handling. Fixes Mantis #3417 --- OpenSim/Region/Framework/Scenes/Scene.cs | 9 ++++++- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 30 +++++++++++++++++++----- 2 files changed, 32 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 30257f1..0da819d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -86,7 +86,8 @@ namespace OpenSim.Region.Framework.Scenes public bool m_clampPrimSize = false; public bool m_trustBinaries = false; public bool m_allowScriptCrossings = false; - + public bool m_useFlySlow = false; + public bool m_usePreJump = false; public bool m_seeIntoRegionFromNeighbor; public int MaxUndoCount = 5; private int m_RestartTimerCounter; @@ -342,6 +343,12 @@ namespace OpenSim.Region.Framework.Scenes // Region config overrides global config // IConfig startupConfig = m_config.Configs["Startup"]; + + //Animation states + m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); + // TODO: Change default to true once the feature is supported + m_usePreJump = startupConfig.GetBoolean("enableprejump", false); + m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); if (RegionInfo.NonphysPrimMax > 0) m_maxNonphys = RegionInfo.NonphysPrimMax; diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 915b202..e0593ed 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -81,7 +81,6 @@ namespace OpenSim.Region.Framework.Scenes private bool MouseDown = false; private SceneObjectGroup proxyObjectGroup; //private SceneObjectPart proxyObjectPart = null; - public Vector3 lastKnownAllowedPosition; public bool sentMessageAboutRestrictedParcelFlyingDown; @@ -118,9 +117,10 @@ namespace OpenSim.Region.Framework.Scenes private bool m_setAlwaysRun; private string m_movementAnimation = "DEFAULT"; - private long m_animPersistUntil; + private long m_animPersistUntil = 0; private bool m_allowFalling = false; - + private bool m_useFlySlow = false; + private bool m_usePreJump = false; private Quaternion m_bodyRot= Quaternion.Identity; @@ -567,6 +567,7 @@ namespace OpenSim.Region.Framework.Scenes private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) { + m_regionHandle = reginfo.RegionHandle; m_controllingClient = client; m_firstname = m_controllingClient.FirstName; @@ -577,6 +578,9 @@ namespace OpenSim.Region.Framework.Scenes m_regionInfo = reginfo; m_localId = m_scene.AllocateLocalId(); + m_useFlySlow = m_scene.m_useFlySlow; + m_usePreJump = m_scene.m_usePreJump; + IGroupsModule gm = m_scene.RequestModuleInterface(); if (gm != null) m_grouptitle = gm.GetGroupTitle(m_uuid); @@ -2007,7 +2011,14 @@ namespace OpenSim.Region.Framework.Scenes } else { - return "FLYSLOW"; + if (m_useFlySlow == false) + { + return "FLY"; + } + else + { + return "FLYSLOW"; + } } } else @@ -2152,8 +2163,15 @@ namespace OpenSim.Region.Framework.Scenes { m_movementAnimation = movementAnimation; } - - TrySetMovementAnimation(movementAnimation); + if (movementAnimation == "PREJUMP" && m_usePreJump == false) + { + //This was the previous behavior before PREJUMP + TrySetMovementAnimation("JUMP"); + } + else + { + TrySetMovementAnimation(movementAnimation); + } } /// -- cgit v1.1