mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
more to go, fix lsl funtions for parcels env
This commit is contained in:
@@ -17487,7 +17487,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (m_envModule == null)
|
||||
return 14400;
|
||||
|
||||
return m_envModule.GetRegionDayLength();
|
||||
return m_envModule.GetDayLength(m_host.GetWorldPosition());
|
||||
}
|
||||
|
||||
public LSL_Integer llGetRegionDayLength()
|
||||
@@ -17507,7 +17507,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (m_envModule == null)
|
||||
return 57600;
|
||||
|
||||
return m_envModule.GetRegionDayOffset();
|
||||
return m_envModule.GetDayOffset(m_host.GetWorldPosition());
|
||||
}
|
||||
|
||||
public LSL_Integer llGetRegionDayOffset()
|
||||
@@ -17527,8 +17527,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (m_envModule == null)
|
||||
return Vector3.Zero;
|
||||
|
||||
float z = m_host.GetWorldPosition().Z;
|
||||
return m_envModule.GetRegionSunDir(z);
|
||||
return m_envModule.GetSunDir(m_host.GetWorldPosition());
|
||||
}
|
||||
|
||||
public LSL_Vector llGetRegionSunDirection()
|
||||
@@ -17549,8 +17548,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (m_envModule == null)
|
||||
return Vector3.Zero;
|
||||
|
||||
float z = m_host.GetWorldPosition().Z;
|
||||
return m_envModule.GetRegionMoonDir(z);
|
||||
return m_envModule.GetMoonDir(m_host.GetWorldPosition());
|
||||
}
|
||||
|
||||
public LSL_Vector llGetRegionMoonDirection()
|
||||
@@ -17571,8 +17569,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (m_envModule == null)
|
||||
return Quaternion.Identity;
|
||||
|
||||
float z = m_host.GetWorldPosition().Z;
|
||||
return m_envModule.GetRegionSunRot(z);
|
||||
return m_envModule.GetSunRot(m_host.GetWorldPosition());
|
||||
}
|
||||
|
||||
public LSL_Rotation llGetRegionSunRotation()
|
||||
@@ -17593,8 +17590,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (m_envModule == null)
|
||||
return Quaternion.Identity;
|
||||
|
||||
float z = m_host.GetWorldPosition().Z;
|
||||
return m_envModule.GetRegionMoonRot(z);
|
||||
return m_envModule.GetMoonRot(m_host.GetWorldPosition());
|
||||
}
|
||||
|
||||
public LSL_Rotation llGetRegionMoonRotation()
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
internal bool m_LSFunctionsEnabled = false;
|
||||
internal IScriptModuleComms m_comms = null;
|
||||
internal IConfig m_osslconfig;
|
||||
internal IEnvironmentModule m_enviroment = null;
|
||||
internal IEnvironmentModule m_environment = null;
|
||||
|
||||
public void Initialize(IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (m_comms == null)
|
||||
m_LSFunctionsEnabled = false;
|
||||
|
||||
m_enviroment = m_ScriptEngine.World.RequestModuleInterface<IEnvironmentModule>();
|
||||
m_environment = m_ScriptEngine.World.RequestModuleInterface<IEnvironmentModule>();
|
||||
}
|
||||
|
||||
public override Object InitializeLifetimeService()
|
||||
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// <returns>List of windlight parameters</returns>
|
||||
public LSL_List lsGetWindlightScene(LSL_List rules)
|
||||
{
|
||||
if (!m_LSFunctionsEnabled || m_enviroment == null)
|
||||
if (!m_LSFunctionsEnabled || m_environment == null)
|
||||
{
|
||||
LSShoutError("LightShare functions are not enabled.");
|
||||
return new LSL_List();
|
||||
@@ -130,7 +130,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
RegionLightShareData wl = m_enviroment.ToLightShare();
|
||||
RegionLightShareData wl = m_environment.ToLightShare();
|
||||
|
||||
LSL_List values = new LSL_List();
|
||||
int idx = 0;
|
||||
@@ -268,7 +268,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
private RegionLightShareData getWindlightProfileFromRules(LSL_List rules)
|
||||
{
|
||||
RegionLightShareData wl = m_enviroment.ToLightShare();
|
||||
RegionLightShareData wl = m_environment.ToLightShare();
|
||||
|
||||
int idx = 0;
|
||||
while (idx < rules.Length)
|
||||
@@ -719,7 +719,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// <returns>success: true or false</returns>
|
||||
public int lsSetWindlightScene(LSL_List rules)
|
||||
{
|
||||
if (!m_LSFunctionsEnabled || m_enviroment == null)
|
||||
if (!m_LSFunctionsEnabled || m_environment == null)
|
||||
{
|
||||
LSShoutError("LightShare functions are not enabled.");
|
||||
return 0;
|
||||
@@ -741,7 +741,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
try
|
||||
{
|
||||
RegionLightShareData wl = getWindlightProfileFromRules(rules);
|
||||
m_enviroment.FromLightShare(wl);
|
||||
m_environment.FromLightShare(wl);
|
||||
}
|
||||
catch(InvalidCastException e)
|
||||
{
|
||||
@@ -754,7 +754,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void lsClearWindlightScene()
|
||||
{
|
||||
if (!m_LSFunctionsEnabled || m_enviroment == null)
|
||||
if (!m_LSFunctionsEnabled || m_environment == null)
|
||||
{
|
||||
LSShoutError("LightShare functions are not enabled.");
|
||||
return;
|
||||
@@ -773,7 +773,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
m_enviroment.ResetEnvironmentSettings(m_host.ParentGroup.Scene.RegionInfo.RegionID);
|
||||
m_environment.ResetEnvironmentSettings(m_host.ParentGroup.Scene.RegionInfo.RegionID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -807,7 +807,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
int success = 0;
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (m_enviroment != null)
|
||||
if (m_environment != null)
|
||||
{
|
||||
RegionLightShareData wl;
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user