diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
10 files changed, 641 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs index 9d97cb2..ee32755 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs | |||
@@ -236,7 +236,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
236 | iHttpReq.StopHttpRequest(localID, itemID); | 236 | iHttpReq.StopHttpRequest(localID, itemID); |
237 | 237 | ||
238 | IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>(); | 238 | IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>(); |
239 | comms.DeleteListener(itemID); | 239 | if (comms != null) |
240 | comms.DeleteListener(itemID); | ||
240 | 241 | ||
241 | IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>(); | 242 | IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>(); |
242 | xmlrpc.DeleteChannels(itemID); | 243 | xmlrpc.DeleteChannels(itemID); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs new file mode 100644 index 0000000..4cc2f0a --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs | |||
@@ -0,0 +1,430 @@ | |||
1 | using System; | ||
2 | using System.Reflection; | ||
3 | using System.Collections; | ||
4 | using System.Collections.Generic; | ||
5 | using System.Runtime.Remoting.Lifetime; | ||
6 | using OpenMetaverse; | ||
7 | using Nini.Config; | ||
8 | using OpenSim; | ||
9 | using OpenSim.Framework; | ||
10 | using OpenSim.Region.CoreModules.World.Meta7Windlight; | ||
11 | using OpenSim.Region.Framework.Interfaces; | ||
12 | using OpenSim.Region.Framework.Scenes; | ||
13 | using OpenSim.Region.ScriptEngine.Shared; | ||
14 | using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; | ||
15 | using OpenSim.Region.ScriptEngine.Shared.ScriptBase; | ||
16 | using OpenSim.Region.ScriptEngine.Interfaces; | ||
17 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | ||
18 | |||
19 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||
20 | using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||
21 | using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||
22 | using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||
23 | using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||
24 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||
25 | using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; | ||
26 | |||
27 | namespace OpenSim.Region.ScriptEngine.Shared.Api | ||
28 | { | ||
29 | [Serializable] | ||
30 | public class CM_Api : MarshalByRefObject, ICM_Api, IScriptApi | ||
31 | { | ||
32 | internal IScriptEngine m_ScriptEngine; | ||
33 | internal SceneObjectPart m_host; | ||
34 | internal uint m_localID; | ||
35 | internal UUID m_itemID; | ||
36 | internal bool m_CMFunctionsEnabled = false; | ||
37 | internal IScriptModuleComms m_comms = null; | ||
38 | |||
39 | public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID) | ||
40 | { | ||
41 | m_ScriptEngine = ScriptEngine; | ||
42 | m_host = host; | ||
43 | m_localID = localID; | ||
44 | m_itemID = itemID; | ||
45 | |||
46 | if (m_ScriptEngine.Config.GetBoolean("AllowCareminsterFunctions", false)) | ||
47 | m_CMFunctionsEnabled = true; | ||
48 | |||
49 | m_comms = m_ScriptEngine.World.RequestModuleInterface<IScriptModuleComms>(); | ||
50 | if (m_comms == null) | ||
51 | m_CMFunctionsEnabled = false; | ||
52 | } | ||
53 | |||
54 | public override Object InitializeLifetimeService() | ||
55 | { | ||
56 | ILease lease = (ILease)base.InitializeLifetimeService(); | ||
57 | |||
58 | if (lease.CurrentState == LeaseState.Initial) | ||
59 | { | ||
60 | lease.InitialLeaseTime = TimeSpan.FromMinutes(0); | ||
61 | // lease.RenewOnCallTime = TimeSpan.FromSeconds(10.0); | ||
62 | // lease.SponsorshipTimeout = TimeSpan.FromMinutes(1.0); | ||
63 | } | ||
64 | return lease; | ||
65 | } | ||
66 | |||
67 | public Scene World | ||
68 | { | ||
69 | get { return m_ScriptEngine.World; } | ||
70 | } | ||
71 | |||
72 | // | ||
73 | //Dumps an error message on the debug console. | ||
74 | // | ||
75 | |||
76 | internal void CMShoutError(string message) | ||
77 | { | ||
78 | if (message.Length > 1023) | ||
79 | message = message.Substring(0, 1023); | ||
80 | |||
81 | World.SimChat(Utils.StringToBytes(message), | ||
82 | ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); | ||
83 | |||
84 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | ||
85 | wComm.DeliverMessage(ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.Name, m_host.UUID, message); | ||
86 | } | ||
87 | |||
88 | /// <summary> | ||
89 | /// Get the current Windlight scene | ||
90 | /// </summary> | ||
91 | /// <returns>List of windlight parameters</returns> | ||
92 | public LSL_List cmGetWindlightScene(LSL_List rules) | ||
93 | { | ||
94 | if (!m_CMFunctionsEnabled) | ||
95 | { | ||
96 | CMShoutError("Careminster functions are not enabled."); | ||
97 | return new LSL_List(); | ||
98 | } | ||
99 | m_host.AddScriptLPS(1); | ||
100 | RegionMeta7WindlightData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; | ||
101 | |||
102 | LSL_List values = new LSL_List(); | ||
103 | int idx = 0; | ||
104 | while (idx < rules.Length) | ||
105 | { | ||
106 | uint rule = (uint)rules.GetLSLIntegerItem(idx); | ||
107 | LSL_List toadd = new LSL_List(); | ||
108 | |||
109 | switch (rule) | ||
110 | { | ||
111 | case (int)ScriptBaseClass.WL_AMBIENT: | ||
112 | toadd.Add(new LSL_Rotation(wl.ambient.X, wl.ambient.Y, wl.ambient.Z, wl.ambient.W)); | ||
113 | break; | ||
114 | case (int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION: | ||
115 | toadd.Add(new LSL_Vector(wl.bigWaveDirection.X, wl.bigWaveDirection.Y, 0.0f)); | ||
116 | break; | ||
117 | case (int)ScriptBaseClass.WL_BLUE_DENSITY: | ||
118 | toadd.Add(new LSL_Rotation(wl.blueDensity.X, wl.blueDensity.Y, wl.blueDensity.Z, wl.blueDensity.W)); | ||
119 | break; | ||
120 | case (int)ScriptBaseClass.WL_BLUR_MULTIPLIER: | ||
121 | toadd.Add(new LSL_Float(wl.blurMultiplier)); | ||
122 | break; | ||
123 | case (int)ScriptBaseClass.WL_CLOUD_COLOR: | ||
124 | toadd.Add(new LSL_Rotation(wl.cloudColor.X, wl.cloudColor.Y, wl.cloudColor.Z, wl.cloudColor.W)); | ||
125 | break; | ||
126 | case (int)ScriptBaseClass.WL_CLOUD_COVERAGE: | ||
127 | toadd.Add(new LSL_Float(wl.cloudCoverage)); | ||
128 | break; | ||
129 | case (int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY: | ||
130 | toadd.Add(new LSL_Vector(wl.cloudDetailXYDensity.X, wl.cloudDetailXYDensity.Y, wl.cloudDetailXYDensity.Z)); | ||
131 | break; | ||
132 | case (int)ScriptBaseClass.WL_CLOUD_SCALE: | ||
133 | toadd.Add(new LSL_Float(wl.cloudScale)); | ||
134 | break; | ||
135 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X: | ||
136 | toadd.Add(new LSL_Float(wl.cloudScrollX)); | ||
137 | break; | ||
138 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK: | ||
139 | toadd.Add(new LSL_Integer(wl.cloudScrollXLock ? 1 : 0)); | ||
140 | break; | ||
141 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y: | ||
142 | toadd.Add(new LSL_Float(wl.cloudScrollY)); | ||
143 | break; | ||
144 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK: | ||
145 | toadd.Add(new LSL_Integer(wl.cloudScrollYLock ? 1 : 0)); | ||
146 | break; | ||
147 | case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: | ||
148 | toadd.Add(new LSL_Vector(wl.cloudXYDensity.X, wl.cloudXYDensity.Y, wl.cloudXYDensity.Z)); | ||
149 | break; | ||
150 | case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: | ||
151 | toadd.Add(new LSL_Float(wl.densityMultiplier)); | ||
152 | break; | ||
153 | case (int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER: | ||
154 | toadd.Add(new LSL_Float(wl.distanceMultiplier)); | ||
155 | break; | ||
156 | case (int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS: | ||
157 | toadd.Add(new LSL_Integer(wl.drawClassicClouds ? 1 : 0)); | ||
158 | break; | ||
159 | case (int)ScriptBaseClass.WL_EAST_ANGLE: | ||
160 | toadd.Add(new LSL_Float(wl.eastAngle)); | ||
161 | break; | ||
162 | case (int)ScriptBaseClass.WL_FRESNEL_OFFSET: | ||
163 | toadd.Add(new LSL_Float(wl.fresnelOffset)); | ||
164 | break; | ||
165 | case (int)ScriptBaseClass.WL_FRESNEL_SCALE: | ||
166 | toadd.Add(new LSL_Float(wl.fresnelScale)); | ||
167 | break; | ||
168 | case (int)ScriptBaseClass.WL_HAZE_DENSITY: | ||
169 | toadd.Add(new LSL_Float(wl.hazeDensity)); | ||
170 | break; | ||
171 | case (int)ScriptBaseClass.WL_HAZE_HORIZON: | ||
172 | toadd.Add(new LSL_Float(wl.hazeHorizon)); | ||
173 | break; | ||
174 | case (int)ScriptBaseClass.WL_HORIZON: | ||
175 | toadd.Add(new LSL_Rotation(wl.horizon.X, wl.horizon.Y, wl.horizon.Z, wl.horizon.W)); | ||
176 | break; | ||
177 | case (int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION: | ||
178 | toadd.Add(new LSL_Vector(wl.littleWaveDirection.X, wl.littleWaveDirection.Y, 0.0f)); | ||
179 | break; | ||
180 | case (int)ScriptBaseClass.WL_MAX_ALTITUDE: | ||
181 | toadd.Add(new LSL_Integer(wl.maxAltitude)); | ||
182 | break; | ||
183 | case (int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE: | ||
184 | toadd.Add(new LSL_Key(wl.normalMapTexture.ToString())); | ||
185 | break; | ||
186 | case (int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE: | ||
187 | toadd.Add(new LSL_Vector(wl.reflectionWaveletScale.X, wl.reflectionWaveletScale.Y, wl.reflectionWaveletScale.Z)); | ||
188 | break; | ||
189 | case (int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE: | ||
190 | toadd.Add(new LSL_Float(wl.refractScaleAbove)); | ||
191 | break; | ||
192 | case (int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW: | ||
193 | toadd.Add(new LSL_Float(wl.refractScaleBelow)); | ||
194 | break; | ||
195 | case (int)ScriptBaseClass.WL_SCENE_GAMMA: | ||
196 | toadd.Add(new LSL_Float(wl.sceneGamma)); | ||
197 | break; | ||
198 | case (int)ScriptBaseClass.WL_STAR_BRIGHTNESS: | ||
199 | toadd.Add(new LSL_Float(wl.starBrightness)); | ||
200 | break; | ||
201 | case (int)ScriptBaseClass.WL_SUN_GLOW_FOCUS: | ||
202 | toadd.Add(new LSL_Float(wl.sunGlowFocus)); | ||
203 | break; | ||
204 | case (int)ScriptBaseClass.WL_SUN_GLOW_SIZE: | ||
205 | toadd.Add(new LSL_Float(wl.sunGlowSize)); | ||
206 | break; | ||
207 | case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: | ||
208 | toadd.Add(new LSL_Rotation(wl.sunMoonColor.X, wl.sunMoonColor.Y, wl.sunMoonColor.Z, wl.sunMoonColor.W)); | ||
209 | break; | ||
210 | case (int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER: | ||
211 | toadd.Add(new LSL_Float(wl.underwaterFogModifier)); | ||
212 | break; | ||
213 | case (int)ScriptBaseClass.WL_WATER_COLOR: | ||
214 | toadd.Add(new LSL_Vector(wl.waterColor.X, wl.waterColor.Y, wl.waterColor.Z)); | ||
215 | break; | ||
216 | case (int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT: | ||
217 | toadd.Add(new LSL_Float(wl.waterFogDensityExponent)); | ||
218 | break; | ||
219 | } | ||
220 | |||
221 | if (toadd.Length > 0) | ||
222 | { | ||
223 | values.Add(rule); | ||
224 | values.Add(toadd.Data[0]); | ||
225 | } | ||
226 | idx++; | ||
227 | } | ||
228 | |||
229 | |||
230 | return values; | ||
231 | |||
232 | } | ||
233 | |||
234 | /// <summary> | ||
235 | /// Set the current Windlight scene | ||
236 | /// </summary> | ||
237 | /// <param name="rules"></param> | ||
238 | /// <returns>success: true or false</returns> | ||
239 | public int cmSetWindlightScene(LSL_List rules) | ||
240 | { | ||
241 | if (!m_CMFunctionsEnabled) | ||
242 | { | ||
243 | CMShoutError("Careminster functions are not enabled."); | ||
244 | return 0; | ||
245 | } | ||
246 | int success = 0; | ||
247 | m_host.AddScriptLPS(1); | ||
248 | if (Meta7WindlightModule.EnableWindlight) | ||
249 | { | ||
250 | RegionMeta7WindlightData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; | ||
251 | |||
252 | LSL_List values = new LSL_List(); | ||
253 | int idx = 0; | ||
254 | success = 1; | ||
255 | while (idx < rules.Length) | ||
256 | { | ||
257 | uint rule = (uint)rules.GetLSLIntegerItem(idx); | ||
258 | LSL_Types.Quaternion iQ; | ||
259 | LSL_Types.Vector3 iV; | ||
260 | switch (rule) | ||
261 | { | ||
262 | case (int)ScriptBaseClass.WL_AMBIENT: | ||
263 | idx++; | ||
264 | iQ = rules.GetQuaternionItem(idx); | ||
265 | wl.ambient = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | ||
266 | break; | ||
267 | case (int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION: | ||
268 | idx++; | ||
269 | iV = rules.GetVector3Item(idx); | ||
270 | wl.bigWaveDirection = new Vector2((float)iV.x, (float)iV.y); | ||
271 | break; | ||
272 | case (int)ScriptBaseClass.WL_BLUE_DENSITY: | ||
273 | idx++; | ||
274 | iQ = rules.GetQuaternionItem(idx); | ||
275 | wl.blueDensity = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | ||
276 | break; | ||
277 | case (int)ScriptBaseClass.WL_BLUR_MULTIPLIER: | ||
278 | idx++; | ||
279 | wl.blurMultiplier = (float)rules.GetLSLFloatItem(idx); | ||
280 | break; | ||
281 | case (int)ScriptBaseClass.WL_CLOUD_COLOR: | ||
282 | idx++; | ||
283 | iQ = rules.GetQuaternionItem(idx); | ||
284 | wl.cloudColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | ||
285 | break; | ||
286 | case (int)ScriptBaseClass.WL_CLOUD_COVERAGE: | ||
287 | idx++; | ||
288 | wl.cloudCoverage = (float)rules.GetLSLFloatItem(idx); | ||
289 | break; | ||
290 | case (int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY: | ||
291 | idx++; | ||
292 | iV = rules.GetVector3Item(idx); | ||
293 | wl.cloudDetailXYDensity = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); | ||
294 | break; | ||
295 | case (int)ScriptBaseClass.WL_CLOUD_SCALE: | ||
296 | idx++; | ||
297 | wl.cloudScale = (float)rules.GetLSLFloatItem(idx); | ||
298 | break; | ||
299 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X: | ||
300 | idx++; | ||
301 | wl.cloudScrollX = (float)rules.GetLSLFloatItem(idx); | ||
302 | break; | ||
303 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK: | ||
304 | idx++; | ||
305 | wl.cloudScrollXLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; | ||
306 | break; | ||
307 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y: | ||
308 | idx++; | ||
309 | wl.cloudScrollY = (float)rules.GetLSLFloatItem(idx); | ||
310 | break; | ||
311 | case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK: | ||
312 | idx++; | ||
313 | wl.cloudScrollYLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; | ||
314 | break; | ||
315 | case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: | ||
316 | idx++; | ||
317 | iV = rules.GetVector3Item(idx); | ||
318 | wl.cloudDetailXYDensity = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); | ||
319 | break; | ||
320 | case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: | ||
321 | idx++; | ||
322 | wl.densityMultiplier = (float)rules.GetLSLFloatItem(idx); | ||
323 | break; | ||
324 | case (int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER: | ||
325 | idx++; | ||
326 | wl.distanceMultiplier = (float)rules.GetLSLFloatItem(idx); | ||
327 | break; | ||
328 | case (int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS: | ||
329 | idx++; | ||
330 | wl.drawClassicClouds = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; | ||
331 | break; | ||
332 | case (int)ScriptBaseClass.WL_EAST_ANGLE: | ||
333 | idx++; | ||
334 | wl.eastAngle = (float)rules.GetLSLFloatItem(idx); | ||
335 | break; | ||
336 | case (int)ScriptBaseClass.WL_FRESNEL_OFFSET: | ||
337 | idx++; | ||
338 | wl.fresnelOffset = (float)rules.GetLSLFloatItem(idx); | ||
339 | break; | ||
340 | case (int)ScriptBaseClass.WL_FRESNEL_SCALE: | ||
341 | idx++; | ||
342 | wl.fresnelScale = (float)rules.GetLSLFloatItem(idx); | ||
343 | break; | ||
344 | case (int)ScriptBaseClass.WL_HAZE_DENSITY: | ||
345 | idx++; | ||
346 | wl.hazeDensity = (float)rules.GetLSLFloatItem(idx); | ||
347 | break; | ||
348 | case (int)ScriptBaseClass.WL_HAZE_HORIZON: | ||
349 | idx++; | ||
350 | wl.hazeHorizon = (float)rules.GetLSLFloatItem(idx); | ||
351 | break; | ||
352 | case (int)ScriptBaseClass.WL_HORIZON: | ||
353 | idx++; | ||
354 | iQ = rules.GetQuaternionItem(idx); | ||
355 | wl.horizon = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | ||
356 | break; | ||
357 | case (int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION: | ||
358 | idx++; | ||
359 | iV = rules.GetVector3Item(idx); | ||
360 | wl.littleWaveDirection = new Vector2((float)iV.x, (float)iV.y); | ||
361 | break; | ||
362 | case (int)ScriptBaseClass.WL_MAX_ALTITUDE: | ||
363 | idx++; | ||
364 | wl.maxAltitude = (ushort)rules.GetLSLIntegerItem(idx).value; | ||
365 | break; | ||
366 | case (int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE: | ||
367 | idx++; | ||
368 | wl.normalMapTexture = new UUID(rules.GetLSLStringItem(idx).m_string); | ||
369 | break; | ||
370 | case (int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE: | ||
371 | idx++; | ||
372 | iV = rules.GetVector3Item(idx); | ||
373 | wl.reflectionWaveletScale = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); | ||
374 | break; | ||
375 | case (int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE: | ||
376 | idx++; | ||
377 | wl.refractScaleAbove = (float)rules.GetLSLFloatItem(idx); | ||
378 | break; | ||
379 | case (int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW: | ||
380 | idx++; | ||
381 | wl.refractScaleBelow = (float)rules.GetLSLFloatItem(idx); | ||
382 | break; | ||
383 | case (int)ScriptBaseClass.WL_SCENE_GAMMA: | ||
384 | idx++; | ||
385 | wl.sceneGamma = (float)rules.GetLSLFloatItem(idx); | ||
386 | break; | ||
387 | case (int)ScriptBaseClass.WL_STAR_BRIGHTNESS: | ||
388 | idx++; | ||
389 | wl.starBrightness = (float)rules.GetLSLFloatItem(idx); | ||
390 | break; | ||
391 | case (int)ScriptBaseClass.WL_SUN_GLOW_FOCUS: | ||
392 | idx++; | ||
393 | wl.sunGlowFocus = (float)rules.GetLSLFloatItem(idx); | ||
394 | break; | ||
395 | case (int)ScriptBaseClass.WL_SUN_GLOW_SIZE: | ||
396 | idx++; | ||
397 | wl.sunGlowSize = (float)rules.GetLSLFloatItem(idx); | ||
398 | break; | ||
399 | case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: | ||
400 | idx++; | ||
401 | iQ = rules.GetQuaternionItem(idx); | ||
402 | wl.sunMoonColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); | ||
403 | break; | ||
404 | case (int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER: | ||
405 | idx++; | ||
406 | wl.underwaterFogModifier = (float)rules.GetLSLFloatItem(idx); | ||
407 | break; | ||
408 | case (int)ScriptBaseClass.WL_WATER_COLOR: | ||
409 | idx++; | ||
410 | iV = rules.GetVector3Item(idx); | ||
411 | wl.waterColor = new Vector3((float)iV.x, (float)iV.y, (float)iV.z); | ||
412 | break; | ||
413 | case (int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT: | ||
414 | idx++; | ||
415 | wl.waterFogDensityExponent = (float)rules.GetLSLFloatItem(idx); | ||
416 | break; | ||
417 | default: | ||
418 | success = 0; | ||
419 | break; | ||
420 | } | ||
421 | idx++; | ||
422 | } | ||
423 | m_host.ParentGroup.Scene.StoreWindlightProfile(wl); | ||
424 | |||
425 | } | ||
426 | return success; | ||
427 | } | ||
428 | |||
429 | } | ||
430 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8274fbf..e694f15 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -749,7 +749,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
749 | ChatTypeEnum.Whisper, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); | 749 | ChatTypeEnum.Whisper, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); |
750 | 750 | ||
751 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 751 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
752 | wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text); | 752 | if (wComm != null) |
753 | wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text); | ||
753 | } | 754 | } |
754 | 755 | ||
755 | public void llSay(int channelID, string text) | 756 | public void llSay(int channelID, string text) |
@@ -769,7 +770,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
769 | ChatTypeEnum.Say, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); | 770 | ChatTypeEnum.Say, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); |
770 | 771 | ||
771 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 772 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
772 | wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text); | 773 | if (wComm != null) |
774 | wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text); | ||
773 | } | 775 | } |
774 | } | 776 | } |
775 | 777 | ||
@@ -784,7 +786,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
784 | ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); | 786 | ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); |
785 | 787 | ||
786 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 788 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
787 | wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text); | 789 | if (wComm != null) |
790 | wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text); | ||
788 | } | 791 | } |
789 | 792 | ||
790 | public void llRegionSay(int channelID, string text) | 793 | public void llRegionSay(int channelID, string text) |
@@ -801,7 +804,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
801 | m_host.AddScriptLPS(1); | 804 | m_host.AddScriptLPS(1); |
802 | 805 | ||
803 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 806 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
804 | wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); | 807 | if (wComm != null) |
808 | wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); | ||
805 | } | 809 | } |
806 | 810 | ||
807 | public LSL_Integer llListen(int channelID, string name, string ID, string msg) | 811 | public LSL_Integer llListen(int channelID, string name, string ID, string msg) |
@@ -810,21 +814,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
810 | UUID keyID; | 814 | UUID keyID; |
811 | UUID.TryParse(ID, out keyID); | 815 | UUID.TryParse(ID, out keyID); |
812 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 816 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
813 | return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg); | 817 | if (wComm != null) |
818 | return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg); | ||
819 | else | ||
820 | return -1; | ||
814 | } | 821 | } |
815 | 822 | ||
816 | public void llListenControl(int number, int active) | 823 | public void llListenControl(int number, int active) |
817 | { | 824 | { |
818 | m_host.AddScriptLPS(1); | 825 | m_host.AddScriptLPS(1); |
819 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 826 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
820 | wComm.ListenControl(m_itemID, number, active); | 827 | if (wComm != null) |
828 | wComm.ListenControl(m_itemID, number, active); | ||
821 | } | 829 | } |
822 | 830 | ||
823 | public void llListenRemove(int number) | 831 | public void llListenRemove(int number) |
824 | { | 832 | { |
825 | m_host.AddScriptLPS(1); | 833 | m_host.AddScriptLPS(1); |
826 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 834 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
827 | wComm.ListenRemove(m_itemID, number); | 835 | if (wComm != null) |
836 | wComm.ListenRemove(m_itemID, number); | ||
828 | } | 837 | } |
829 | 838 | ||
830 | public void llSensor(string name, string id, int type, double range, double arc) | 839 | public void llSensor(string name, string id, int type, double range, double arc) |
@@ -1052,7 +1061,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1052 | return detectedParams.TouchUV; | 1061 | return detectedParams.TouchUV; |
1053 | } | 1062 | } |
1054 | 1063 | ||
1055 | public void llDie() | 1064 | public virtual void llDie() |
1056 | { | 1065 | { |
1057 | m_host.AddScriptLPS(1); | 1066 | m_host.AddScriptLPS(1); |
1058 | throw new SelfDeleteException(); | 1067 | throw new SelfDeleteException(); |
@@ -2941,8 +2950,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2941 | return m_host.OwnerID.ToString(); | 2950 | return m_host.OwnerID.ToString(); |
2942 | } | 2951 | } |
2943 | 2952 | ||
2953 | [DebuggerNonUserCode] | ||
2944 | public void llInstantMessage(string user, string message) | 2954 | public void llInstantMessage(string user, string message) |
2945 | { | 2955 | { |
2956 | UUID result; | ||
2957 | if (!UUID.TryParse(user, out result)) | ||
2958 | { | ||
2959 | throw new Exception(String.Format("An invalid key of '{0} was passed to llInstantMessage", user)); | ||
2960 | return; | ||
2961 | } | ||
2962 | |||
2963 | |||
2946 | m_host.AddScriptLPS(1); | 2964 | m_host.AddScriptLPS(1); |
2947 | 2965 | ||
2948 | // We may be able to use ClientView.SendInstantMessage here, but we need a client instance. | 2966 | // We may be able to use ClientView.SendInstantMessage here, but we need a client instance. |
@@ -2957,7 +2975,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2957 | UUID friendTransactionID = UUID.Random(); | 2975 | UUID friendTransactionID = UUID.Random(); |
2958 | 2976 | ||
2959 | //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); | 2977 | //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); |
2960 | 2978 | ||
2961 | GridInstantMessage msg = new GridInstantMessage(); | 2979 | GridInstantMessage msg = new GridInstantMessage(); |
2962 | msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.Guid; | 2980 | msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.Guid; |
2963 | msg.toAgentID = new Guid(user); // toAgentID.Guid; | 2981 | msg.toAgentID = new Guid(user); // toAgentID.Guid; |
@@ -3570,6 +3588,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3570 | { | 3588 | { |
3571 | parentPrim.DelinkFromGroup(part.LocalId, true); | 3589 | parentPrim.DelinkFromGroup(part.LocalId, true); |
3572 | } | 3590 | } |
3591 | parentPrim.HasGroupChanged = true; | ||
3592 | parentPrim.ScheduleGroupForFullUpdate(); | ||
3573 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); | 3593 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); |
3574 | 3594 | ||
3575 | if (parts.Count > 0) | 3595 | if (parts.Count > 0) |
@@ -3581,6 +3601,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3581 | part.UpdateFlag = 0; | 3601 | part.UpdateFlag = 0; |
3582 | newRoot.ParentGroup.LinkToGroup(part.ParentGroup); | 3602 | newRoot.ParentGroup.LinkToGroup(part.ParentGroup); |
3583 | } | 3603 | } |
3604 | newRoot.ParentGroup.HasGroupChanged = true; | ||
3605 | newRoot.ParentGroup.ScheduleGroupForFullUpdate(); | ||
3584 | } | 3606 | } |
3585 | } | 3607 | } |
3586 | else | 3608 | else |
@@ -3589,6 +3611,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3589 | return; | 3611 | return; |
3590 | 3612 | ||
3591 | parentPrim.DelinkFromGroup(childPrim.LocalId, true); | 3613 | parentPrim.DelinkFromGroup(childPrim.LocalId, true); |
3614 | parentPrim.HasGroupChanged = true; | ||
3615 | parentPrim.ScheduleGroupForFullUpdate(); | ||
3592 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); | 3616 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); |
3593 | } | 3617 | } |
3594 | } | 3618 | } |
@@ -3608,6 +3632,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3608 | parentPrim.DelinkFromGroup(part.LocalId, true); | 3632 | parentPrim.DelinkFromGroup(part.LocalId, true); |
3609 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); | 3633 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); |
3610 | } | 3634 | } |
3635 | parentPrim.HasGroupChanged = true; | ||
3636 | parentPrim.ScheduleGroupForFullUpdate(); | ||
3611 | } | 3637 | } |
3612 | 3638 | ||
3613 | public LSL_String llGetLinkKey(int linknum) | 3639 | public LSL_String llGetLinkKey(int linknum) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 7f739b1..836f276 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1973,6 +1973,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1973 | } | 1973 | } |
1974 | return ret; | 1974 | return ret; |
1975 | } | 1975 | } |
1976 | |||
1977 | } | 1976 | } |
1978 | } | 1977 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs index 0716d45..eeb59d9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs | |||
@@ -166,7 +166,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
166 | ts.next = DateTime.Now.Ticks + (long)data[idx+1]; | 166 | ts.next = DateTime.Now.Ticks + (long)data[idx+1]; |
167 | idx += 2; | 167 | idx += 2; |
168 | 168 | ||
169 | Timers.Add(MakeTimerKey(localID,itemID), ts); | 169 | lock (TimerListLock) |
170 | { | ||
171 | Timers.Add(MakeTimerKey(localID, itemID), ts); | ||
172 | } | ||
170 | } | 173 | } |
171 | } | 174 | } |
172 | } | 175 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs new file mode 100644 index 0000000..9dd0b73 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs | |||
@@ -0,0 +1,20 @@ | |||
1 | using System.Collections; | ||
2 | using OpenSim.Region.ScriptEngine.Interfaces; | ||
3 | |||
4 | using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||
5 | using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||
6 | using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; | ||
7 | using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||
8 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||
9 | using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||
10 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||
11 | |||
12 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | ||
13 | { | ||
14 | public interface ICM_Api | ||
15 | { | ||
16 | // Windlight Functions | ||
17 | LSL_List cmGetWindlightScene(LSL_List rules); | ||
18 | int cmSetWindlightScene(LSL_List rules); | ||
19 | } | ||
20 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 0b0dc00..c3bf7d2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
80 | // Avatar Info Commands | 80 | // Avatar Info Commands |
81 | string osGetAgentIP(string agent); | 81 | string osGetAgentIP(string agent); |
82 | LSL_List osGetAgents(); | 82 | LSL_List osGetAgents(); |
83 | 83 | ||
84 | // Teleport commands | 84 | // Teleport commands |
85 | void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | 85 | void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); |
86 | void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | 86 | void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs new file mode 100644 index 0000000..7b67fa3 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; | ||
30 | using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||
31 | using LSLInteger = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||
32 | |||
33 | namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | ||
34 | { | ||
35 | public partial class ScriptBaseClass | ||
36 | { | ||
37 | // Constants for cmWindlight* | ||
38 | public const int WL_WATER_COLOR = 0; | ||
39 | public const int WL_WATER_FOG_DENSITY_EXPONENT = 1; | ||
40 | public const int WL_UNDERWATER_FOG_MODIFIER = 2; | ||
41 | public const int WL_REFLECTION_WAVELET_SCALE = 3; | ||
42 | public const int WL_FRESNEL_SCALE = 4; | ||
43 | public const int WL_FRESNEL_OFFSET = 5; | ||
44 | public const int WL_REFRACT_SCALE_ABOVE = 6; | ||
45 | public const int WL_REFRACT_SCALE_BELOW = 7; | ||
46 | public const int WL_BLUR_MULTIPLIER = 8; | ||
47 | public const int WL_BIG_WAVE_DIRECTION = 9; | ||
48 | public const int WL_LITTLE_WAVE_DIRECTION = 10; | ||
49 | public const int WL_NORMAL_MAP_TEXTURE = 11; | ||
50 | public const int WL_HORIZON = 12; | ||
51 | public const int WL_HAZE_HORIZON = 13; | ||
52 | public const int WL_BLUE_DENSITY = 14; | ||
53 | public const int WL_HAZE_DENSITY = 15; | ||
54 | public const int WL_DENSITY_MULTIPLIER = 16; | ||
55 | public const int WL_DISTANCE_MULTIPLIER = 17; | ||
56 | public const int WL_MAX_ALTITUDE = 18; | ||
57 | public const int WL_SUN_MOON_COLOR = 19; | ||
58 | public const int WL_AMBIENT = 20; | ||
59 | public const int WL_EAST_ANGLE = 21; | ||
60 | public const int WL_SUN_GLOW_FOCUS = 22; | ||
61 | public const int WL_SUN_GLOW_SIZE = 23; | ||
62 | public const int WL_SCENE_GAMMA = 24; | ||
63 | public const int WL_STAR_BRIGHTNESS = 25; | ||
64 | public const int WL_CLOUD_COLOR = 26; | ||
65 | public const int WL_CLOUD_XY_DENSITY = 27; | ||
66 | public const int WL_CLOUD_COVERAGE = 28; | ||
67 | public const int WL_CLOUD_SCALE = 29; | ||
68 | public const int WL_CLOUD_DETAIL_XY_DENSITY = 30; | ||
69 | public const int WL_CLOUD_SCROLL_X = 31; | ||
70 | public const int WL_CLOUD_SCROLL_Y = 32; | ||
71 | public const int WL_CLOUD_SCROLL_Y_LOCK = 33; | ||
72 | public const int WL_CLOUD_SCROLL_X_LOCK = 34; | ||
73 | public const int WL_DRAW_CLASSIC_CLOUDS = 35; | ||
74 | |||
75 | } | ||
76 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs new file mode 100644 index 0000000..e85d41e --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Runtime.Remoting.Lifetime; | ||
30 | using System.Threading; | ||
31 | using System.Reflection; | ||
32 | using System.Collections; | ||
33 | using System.Collections.Generic; | ||
34 | using OpenSim.Framework; | ||
35 | using OpenSim.Region.Framework.Interfaces; | ||
36 | using OpenSim.Region.ScriptEngine.Interfaces; | ||
37 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | ||
38 | using integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||
39 | using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; | ||
40 | using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | ||
41 | using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||
42 | using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | ||
43 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | ||
44 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | ||
45 | using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; | ||
46 | |||
47 | namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | ||
48 | { | ||
49 | public partial class ScriptBaseClass : MarshalByRefObject | ||
50 | { | ||
51 | public ICM_Api m_CM_Functions; | ||
52 | |||
53 | public void ApiTypeCM(IScriptApi api) | ||
54 | { | ||
55 | if (!(api is ICM_Api)) | ||
56 | return; | ||
57 | |||
58 | m_CM_Functions = (ICM_Api)api; | ||
59 | } | ||
60 | |||
61 | public LSL_List cmGetWindlightScene(LSL_List rules) | ||
62 | { | ||
63 | return m_CM_Functions.cmGetWindlightScene(rules); | ||
64 | } | ||
65 | |||
66 | public int cmSetWindlightScene(LSL_List rules) | ||
67 | { | ||
68 | return m_CM_Functions.cmSetWindlightScene(rules); | ||
69 | } | ||
70 | } | ||
71 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp index 98bbc68..23138ef 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp | |||
@@ -17,6 +17,8 @@ | |||
17 | <excludeFiles /> | 17 | <excludeFiles /> |
18 | </DeploymentInformation> | 18 | </DeploymentInformation> |
19 | <Contents> | 19 | <Contents> |
20 | <File name="./CM_Constants.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | ||
21 | <File name="./CM_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | ||
20 | <File name="./Executor.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | 22 | <File name="./Executor.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |
21 | <File name="./LSL_Constants.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | 23 | <File name="./LSL_Constants.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |
22 | <File name="./LSL_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | 24 | <File name="./LSL_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |