diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 6827ede..5212e1b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2213,6 +2213,48 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2213 | 2213 | ||
2214 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules); | 2214 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules); |
2215 | } | 2215 | } |
2216 | |||
2217 | /// <summary> | ||
2218 | /// Set parameters for light projection in host prim | ||
2219 | /// </summary> | ||
2220 | public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb) | ||
2221 | { | ||
2222 | CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); | ||
2223 | |||
2224 | osSetProjectionParams(UUID.Zero.ToString(), projection, texture, fov, focus, amb); | ||
2225 | } | ||
2226 | |||
2227 | /// <summary> | ||
2228 | /// Set parameters for light projection with uuid of target prim | ||
2229 | /// </summary> | ||
2230 | public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb) | ||
2231 | { | ||
2232 | CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); | ||
2233 | m_host.AddScriptLPS(1); | ||
2234 | |||
2235 | SceneObjectPart obj = null; | ||
2236 | if (prim == UUID.Zero.ToString()) | ||
2237 | { | ||
2238 | obj = m_host; | ||
2239 | } | ||
2240 | else | ||
2241 | { | ||
2242 | obj = World.GetSceneObjectPart(new UUID(prim)); | ||
2243 | if (obj == null) | ||
2244 | return; | ||
2245 | } | ||
2246 | |||
2247 | obj.Shape.ProjectionEntry = projection; | ||
2248 | obj.Shape.ProjectionTextureUUID = new UUID(texture); | ||
2249 | obj.Shape.ProjectionFOV = (float)fov; | ||
2250 | obj.Shape.ProjectionFocus = (float)focus; | ||
2251 | obj.Shape.ProjectionAmbiance = (float)amb; | ||
2252 | |||
2253 | |||
2254 | obj.ParentGroup.HasGroupChanged = true; | ||
2255 | obj.ScheduleFullUpdate(); | ||
2256 | |||
2257 | } | ||
2216 | 2258 | ||
2217 | /// <summary> | 2259 | /// <summary> |
2218 | /// Like osGetAgents but returns enough info for a radar | 2260 | /// Like osGetAgents but returns enough info for a radar |