some fixes on env protocol, forced env, etc

This commit is contained in:
UbitUmarov
2020-06-21 01:41:14 +01:00
parent 17e7e9b354
commit 5b56a09cb2
6 changed files with 70 additions and 54 deletions

View File

@@ -5883,7 +5883,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return m_host.ClearObjectAnimations();
}
public LSL_Integer osReplaceAgentEnvironment(LSL_Key agentkey, LSL_Integer transition, LSL_String environment)
public LSL_Integer osReplaceAgentEnvironment(LSL_Key agentkey, LSL_Integer transition, LSL_String daycycle)
{
m_host.AddScriptLPS(1);
if(!string.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.Moderate, "osReplaceAgentEnvironment")))
@@ -5896,14 +5896,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if(sp == null || sp.IsChildAgent || sp.IsNPC || sp.IsInTransit)
return -4;
if(string.IsNullOrEmpty(environment) || environment == UUID.Zero.ToString())
if(string.IsNullOrEmpty(daycycle) || daycycle == UUID.Zero.ToString())
{
sp.Environment = null;
m_envModule.WindlightRefresh(sp, transition);
return 1;
}
UUID envID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, environment);
UUID envID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, daycycle);
if (envID == UUID.Zero)
return -3;

View File

@@ -579,6 +579,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_Float osGetApparentRegionTime();
LSL_String osGetApparentRegionTimeString(LSL_Integer format24);
LSL_Integer osReplaceAgentEnvironment(LSL_Key agentkey, LSL_Integer transition, LSL_String environment);
LSL_Integer osReplaceAgentEnvironment(LSL_Key agentkey, LSL_Integer transition, LSL_String daycycle);
}
}

View File

@@ -1502,9 +1502,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
return m_OSSL_Functions.osGetApparentRegionTimeString(format24);
}
public LSL_Integer osReplaceAgentEnvironment(LSL_Key agentkey, LSL_Integer transition, LSL_String environment)
public LSL_Integer osReplaceAgentEnvironment(LSL_Key agentkey, LSL_Integer transition, LSL_String daycycle)
{
return m_OSSL_Functions.osReplaceAgentEnvironment(agentkey, transition, environment);
return m_OSSL_Functions.osReplaceAgentEnvironment(agentkey, transition, daycycle);
}
}
}