diff --git a/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs b/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs index 8f58f21896..806559e630 100644 --- a/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs +++ b/OpenSim/Region/CoreModules/World/LightShare/EnvironmentModule.cs @@ -67,7 +67,6 @@ namespace OpenSim.Region.CoreModules.World.LightShare private int m_regionEnvVersion = -1; private double m_framets; - private float m_dayFrac; #region INonSharedRegionModule public void Initialise(IConfigSource source) @@ -448,6 +447,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare if (VEnv == null) { // need a proper clone + VEnv = new ViewerEnviroment(); OSD otmp = m_DefaultEnv.ToOSD(); byte[] btmp = OSDParser.SerializeLLSDXmlToBytes(otmp); otmp = OSDParser.DeserializeLLSDXml(btmp); @@ -802,6 +802,12 @@ namespace OpenSim.Region.CoreModules.World.LightShare return Utils.Clamp(dayfrac, 0f, 1f); } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public float GetRegionDayFractionTime() + { + return GetDayFractionTime(GetRegionEnviroment()); + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] public int GetDayLength(ViewerEnviroment env) { diff --git a/OpenSim/Region/Framework/Interfaces/IEnvironmentModule.cs b/OpenSim/Region/Framework/Interfaces/IEnvironmentModule.cs index 65d541c241..3be3e538a9 100644 --- a/OpenSim/Region/Framework/Interfaces/IEnvironmentModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IEnvironmentModule.cs @@ -37,6 +37,7 @@ namespace OpenSim.Region.Framework.Interfaces RegionLightShareData ToLightShare(); byte[] GetDefaultAssetData(int type); + float GetRegionDayFractionTime(); int GetRegionDayLength(); int GetRegionDayOffset(); Vector3 GetRegionSunDir(float altitude);