diff options
author | Justin Clark-Casey (justincc) | 2010-10-19 02:08:50 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-10-19 02:08:50 +0100 |
commit | 99388ce6101ff5b2a2c269a2d6cce0b0375f1136 (patch) | |
tree | a35030eea96f2340bed155fa6f842d8854625cc0 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Pass in requesting agent ID when GetGroupMembers is called in the XMLRPC grou... (diff) | |
parent | Comment a spammy debug message in the serializer (diff) | |
download | opensim-SC_OLD-99388ce6101ff5b2a2c269a2d6cce0b0375f1136.zip opensim-SC_OLD-99388ce6101ff5b2a2c269a2d6cce0b0375f1136.tar.gz opensim-SC_OLD-99388ce6101ff5b2a2c269a2d6cce0b0375f1136.tar.bz2 opensim-SC_OLD-99388ce6101ff5b2a2c269a2d6cce0b0375f1136.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
3 files changed, 55 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 477c52d..8a98be7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2200,6 +2200,48 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2200 | 2200 | ||
2201 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules); | 2201 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules); |
2202 | } | 2202 | } |
2203 | |||
2204 | /// <summary> | ||
2205 | /// Set parameters for light projection in host prim | ||
2206 | /// </summary> | ||
2207 | public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb) | ||
2208 | { | ||
2209 | CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); | ||
2210 | |||
2211 | osSetProjectionParams(UUID.Zero.ToString(), projection, texture, fov, focus, amb); | ||
2212 | } | ||
2213 | |||
2214 | /// <summary> | ||
2215 | /// Set parameters for light projection with uuid of target prim | ||
2216 | /// </summary> | ||
2217 | public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb) | ||
2218 | { | ||
2219 | CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); | ||
2220 | m_host.AddScriptLPS(1); | ||
2221 | |||
2222 | SceneObjectPart obj = null; | ||
2223 | if (prim == UUID.Zero.ToString()) | ||
2224 | { | ||
2225 | obj = m_host; | ||
2226 | } | ||
2227 | else | ||
2228 | { | ||
2229 | obj = World.GetSceneObjectPart(new UUID(prim)); | ||
2230 | if (obj == null) | ||
2231 | return; | ||
2232 | } | ||
2233 | |||
2234 | obj.Shape.ProjectionEntry = projection; | ||
2235 | obj.Shape.ProjectionTextureUUID = new UUID(texture); | ||
2236 | obj.Shape.ProjectionFOV = (float)fov; | ||
2237 | obj.Shape.ProjectionFocus = (float)focus; | ||
2238 | obj.Shape.ProjectionAmbiance = (float)amb; | ||
2239 | |||
2240 | |||
2241 | obj.ParentGroup.HasGroupChanged = true; | ||
2242 | obj.ScheduleFullUpdate(); | ||
2243 | |||
2244 | } | ||
2203 | 2245 | ||
2204 | /// <summary> | 2246 | /// <summary> |
2205 | /// Like osGetAgents but returns enough info for a radar | 2247 | /// Like osGetAgents but returns enough info for a radar |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 78ee43c..630821b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -176,6 +176,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
176 | void osCauseDamage(string avatar, double damage); | 176 | void osCauseDamage(string avatar, double damage); |
177 | LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); | 177 | LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); |
178 | void osSetPrimitiveParams(LSL_Key prim, LSL_List rules); | 178 | void osSetPrimitiveParams(LSL_Key prim, LSL_List rules); |
179 | void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb); | ||
180 | void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb); | ||
181 | |||
179 | LSL_List osGetAvatarList(); | 182 | LSL_List osGetAvatarList(); |
180 | 183 | ||
181 | } | 184 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 6cc5f51..e289554 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -688,6 +688,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
688 | m_OSSL_Functions.osSetPrimitiveParams(prim, rules); | 688 | m_OSSL_Functions.osSetPrimitiveParams(prim, rules); |
689 | } | 689 | } |
690 | 690 | ||
691 | public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb) | ||
692 | { | ||
693 | m_OSSL_Functions.osSetProjectionParams(projection, texture, fov, focus, amb); | ||
694 | } | ||
695 | |||
696 | public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb) | ||
697 | { | ||
698 | m_OSSL_Functions.osSetProjectionParams(prim, projection, texture, fov, focus, amb); | ||
699 | } | ||
700 | |||
691 | public LSL_List osGetAvatarList() | 701 | public LSL_List osGetAvatarList() |
692 | { | 702 | { |
693 | return m_OSSL_Functions.osGetAvatarList(); | 703 | return m_OSSL_Functions.osGetAvatarList(); |