mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
@@ -2213,6 +2213,48 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
m_LSL_Api.SetPrimitiveParamsEx(prim, rules);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set parameters for light projection in host prim
|
||||
/// </summary>
|
||||
public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams");
|
||||
|
||||
osSetProjectionParams(UUID.Zero.ToString(), projection, texture, fov, focus, amb);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set parameters for light projection with uuid of target prim
|
||||
/// </summary>
|
||||
public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
SceneObjectPart obj = null;
|
||||
if (prim == UUID.Zero.ToString())
|
||||
{
|
||||
obj = m_host;
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = World.GetSceneObjectPart(new UUID(prim));
|
||||
if (obj == null)
|
||||
return;
|
||||
}
|
||||
|
||||
obj.Shape.ProjectionEntry = projection;
|
||||
obj.Shape.ProjectionTextureUUID = new UUID(texture);
|
||||
obj.Shape.ProjectionFOV = (float)fov;
|
||||
obj.Shape.ProjectionFocus = (float)focus;
|
||||
obj.Shape.ProjectionAmbiance = (float)amb;
|
||||
|
||||
|
||||
obj.ParentGroup.HasGroupChanged = true;
|
||||
obj.ScheduleFullUpdate();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Like osGetAgents but returns enough info for a radar
|
||||
|
||||
@@ -176,6 +176,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void osCauseDamage(string avatar, double damage);
|
||||
LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules);
|
||||
void osSetPrimitiveParams(LSL_Key prim, LSL_List rules);
|
||||
void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb);
|
||||
void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb);
|
||||
|
||||
LSL_List osGetAvatarList();
|
||||
|
||||
}
|
||||
|
||||
@@ -688,6 +688,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
|
||||
}
|
||||
|
||||
public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
|
||||
{
|
||||
m_OSSL_Functions.osSetProjectionParams(projection, texture, fov, focus, amb);
|
||||
}
|
||||
|
||||
public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb)
|
||||
{
|
||||
m_OSSL_Functions.osSetProjectionParams(prim, projection, texture, fov, focus, amb);
|
||||
}
|
||||
|
||||
public LSL_List osGetAvatarList()
|
||||
{
|
||||
return m_OSSL_Functions.osGetAvatarList();
|
||||
|
||||
Reference in New Issue
Block a user