diff options
author | Melanie | 2010-10-18 20:30:46 +0100 |
---|---|---|
committer | Melanie | 2010-10-18 20:30:46 +0100 |
commit | bb7a755cba628a24bb339ed0aa974ac0ee5503d1 (patch) | |
tree | b1c7fd32711dd46b7080643c6a6900f3fe827cce /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
parent | Alphabetize results on region search by prefix matching (diff) | |
download | opensim-SC-bb7a755cba628a24bb339ed0aa974ac0ee5503d1.zip opensim-SC-bb7a755cba628a24bb339ed0aa974ac0ee5503d1.tar.gz opensim-SC-bb7a755cba628a24bb339ed0aa974ac0ee5503d1.tar.bz2 opensim-SC-bb7a755cba628a24bb339ed0aa974ac0ee5503d1.tar.xz |
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 |