mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
some fixes on env protocol, forced env, etc
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user