mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
add other env time function
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user