add other env time function
parent
e8b9735f95
commit
e407f69b2c
|
@ -67,7 +67,6 @@ namespace OpenSim.Region.CoreModules.World.LightShare
|
||||||
private int m_regionEnvVersion = -1;
|
private int m_regionEnvVersion = -1;
|
||||||
|
|
||||||
private double m_framets;
|
private double m_framets;
|
||||||
private float m_dayFrac;
|
|
||||||
|
|
||||||
#region INonSharedRegionModule
|
#region INonSharedRegionModule
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
|
@ -448,6 +447,7 @@ namespace OpenSim.Region.CoreModules.World.LightShare
|
||||||
if (VEnv == null)
|
if (VEnv == null)
|
||||||
{
|
{
|
||||||
// need a proper clone
|
// need a proper clone
|
||||||
|
VEnv = new ViewerEnviroment();
|
||||||
OSD otmp = m_DefaultEnv.ToOSD();
|
OSD otmp = m_DefaultEnv.ToOSD();
|
||||||
byte[] btmp = OSDParser.SerializeLLSDXmlToBytes(otmp);
|
byte[] btmp = OSDParser.SerializeLLSDXmlToBytes(otmp);
|
||||||
otmp = OSDParser.DeserializeLLSDXml(btmp);
|
otmp = OSDParser.DeserializeLLSDXml(btmp);
|
||||||
|
@ -802,6 +802,12 @@ namespace OpenSim.Region.CoreModules.World.LightShare
|
||||||
return Utils.Clamp(dayfrac, 0f, 1f);
|
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)]
|
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||||
public int GetDayLength(ViewerEnviroment env)
|
public int GetDayLength(ViewerEnviroment env)
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
RegionLightShareData ToLightShare();
|
RegionLightShareData ToLightShare();
|
||||||
byte[] GetDefaultAssetData(int type);
|
byte[] GetDefaultAssetData(int type);
|
||||||
|
|
||||||
|
float GetRegionDayFractionTime();
|
||||||
int GetRegionDayLength();
|
int GetRegionDayLength();
|
||||||
int GetRegionDayOffset();
|
int GetRegionDayOffset();
|
||||||
Vector3 GetRegionSunDir(float altitude);
|
Vector3 GetRegionSunDir(float altitude);
|
||||||
|
|
Loading…
Reference in New Issue