aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorMelanie2010-10-18 20:30:46 +0100
committerMelanie2010-10-18 20:30:46 +0100
commitbb7a755cba628a24bb339ed0aa974ac0ee5503d1 (patch)
treeb1c7fd32711dd46b7080643c6a6900f3fe827cce /OpenSim/Region/ScriptEngine/Shared
parentMerge branch 'master' into careminster-presence-refactor (diff)
parentAlphabetize results on region search by prefix matching (diff)
downloadopensim-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')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs42
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs10
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 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
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index c8f3623..fbf601a 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();