aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs120
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs64
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs11
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs2
10 files changed, 111 insertions, 98 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 0db6fe3..be6ac0a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -45,6 +45,7 @@ using OpenSim.Region.CoreModules.World.Terrain;
45using OpenSim.Region.Framework.Interfaces; 45using OpenSim.Region.Framework.Interfaces;
46using OpenSim.Region.Framework.Scenes; 46using OpenSim.Region.Framework.Scenes;
47using OpenSim.Region.Framework.Scenes.Animation; 47using OpenSim.Region.Framework.Scenes.Animation;
48using OpenSim.Region.Framework.Scenes.Scripting;
48using OpenSim.Region.Physics.Manager; 49using OpenSim.Region.Physics.Manager;
49using OpenSim.Region.ScriptEngine.Shared; 50using OpenSim.Region.ScriptEngine.Shared;
50using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; 51using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
@@ -333,79 +334,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
333 } 334 }
334 } 335 }
335 336
336 protected UUID InventoryKey(string name, int type)
337 {
338 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name);
339
340 if (item != null && item.Type == type)
341 return item.AssetID;
342 else
343 return UUID.Zero;
344 }
345
346 /// <summary>
347 /// accepts a valid UUID, -or- a name of an inventory item.
348 /// Returns a valid UUID or UUID.Zero if key invalid and item not found
349 /// in prim inventory.
350 /// </summary>
351 /// <param name="k"></param>
352 /// <returns></returns>
353 protected UUID KeyOrName(string k)
354 {
355 UUID key;
356
357 // if we can parse the string as a key, use it.
358 // else try to locate the name in inventory of object. found returns key,
359 // not found returns UUID.Zero
360 if (!UUID.TryParse(k, out key))
361 {
362 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(k);
363
364 if (item != null)
365 key = item.AssetID;
366 else
367 key = UUID.Zero;
368 }
369
370 return key;
371 }
372
373 /// <summary>
374 /// Return the UUID of the asset matching the specified key or name
375 /// and asset type.
376 /// </summary>
377 /// <param name="k"></param>
378 /// <param name="type"></param>
379 /// <returns></returns>
380 protected UUID KeyOrName(string k, AssetType type)
381 {
382 UUID key;
383
384 if (!UUID.TryParse(k, out key))
385 {
386 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(k);
387 if (item != null && item.Type == (int)type)
388 key = item.AssetID;
389 }
390 else
391 {
392 lock (m_host.TaskInventory)
393 {
394 foreach (KeyValuePair<UUID, TaskInventoryItem> item in m_host.TaskInventory)
395 {
396 if (item.Value.Type == (int)type && item.Value.Name == k)
397 {
398 key = item.Value.ItemID;
399 break;
400 }
401 }
402 }
403 }
404
405
406 return key;
407 }
408
409 //These are the implementations of the various ll-functions used by the LSL scripts. 337 //These are the implementations of the various ll-functions used by the LSL scripts.
410 public LSL_Float llSin(double f) 338 public LSL_Float llSin(double f)
411 { 339 {
@@ -1816,7 +1744,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1816 { 1744 {
1817 UUID textureID = new UUID(); 1745 UUID textureID = new UUID();
1818 1746
1819 textureID = InventoryKey(texture, (int)AssetType.Texture); 1747 textureID = ScriptUtils.GetAssetIdFromItemName(m_host, texture, (int)AssetType.Texture);
1820 if (textureID == UUID.Zero) 1748 if (textureID == UUID.Zero)
1821 { 1749 {
1822 if (!UUID.TryParse(texture, out textureID)) 1750 if (!UUID.TryParse(texture, out textureID))
@@ -2450,7 +2378,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2450 if (m_SoundModule != null) 2378 if (m_SoundModule != null)
2451 { 2379 {
2452 m_SoundModule.SendSound(m_host.UUID, 2380 m_SoundModule.SendSound(m_host.UUID,
2453 KeyOrName(sound, AssetType.Sound), volume, false, 0, 2381 ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), volume, false, 0,
2454 0, false, false); 2382 0, false, false);
2455 } 2383 }
2456 } 2384 }
@@ -2460,7 +2388,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2460 m_host.AddScriptLPS(1); 2388 m_host.AddScriptLPS(1);
2461 if (m_SoundModule != null) 2389 if (m_SoundModule != null)
2462 { 2390 {
2463 m_SoundModule.LoopSound(m_host.UUID, KeyOrName(sound), 2391 m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound),
2464 volume, 20, false); 2392 volume, 20, false);
2465 } 2393 }
2466 } 2394 }
@@ -2470,7 +2398,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2470 m_host.AddScriptLPS(1); 2398 m_host.AddScriptLPS(1);
2471 if (m_SoundModule != null) 2399 if (m_SoundModule != null)
2472 { 2400 {
2473 m_SoundModule.LoopSound(m_host.UUID, KeyOrName(sound), 2401 m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound),
2474 volume, 20, true); 2402 volume, 20, true);
2475 } 2403 }
2476 } 2404 }
@@ -2492,7 +2420,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2492 if (m_SoundModule != null) 2420 if (m_SoundModule != null)
2493 { 2421 {
2494 m_SoundModule.SendSound(m_host.UUID, 2422 m_SoundModule.SendSound(m_host.UUID,
2495 KeyOrName(sound, AssetType.Sound), volume, false, 0, 2423 ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), volume, false, 0,
2496 0, true, false); 2424 0, true, false);
2497 } 2425 }
2498 } 2426 }
@@ -2504,7 +2432,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2504 if (m_SoundModule != null) 2432 if (m_SoundModule != null)
2505 { 2433 {
2506 m_SoundModule.SendSound(m_host.UUID, 2434 m_SoundModule.SendSound(m_host.UUID,
2507 KeyOrName(sound, AssetType.Sound), volume, true, 0, 0, 2435 ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), volume, true, 0, 0,
2508 false, false); 2436 false, false);
2509 } 2437 }
2510 } 2438 }
@@ -2521,7 +2449,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2521 { 2449 {
2522 m_host.AddScriptLPS(1); 2450 m_host.AddScriptLPS(1);
2523 if (m_SoundModule != null) 2451 if (m_SoundModule != null)
2524 m_SoundModule.PreloadSound(m_host.UUID, KeyOrName(sound), 0); 2452 m_SoundModule.PreloadSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), 0);
2525 ScriptSleep(1000); 2453 ScriptSleep(1000);
2526 } 2454 }
2527 2455
@@ -3352,7 +3280,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3352 if (presence != null) 3280 if (presence != null)
3353 { 3281 {
3354 // Do NOT try to parse UUID, animations cannot be triggered by ID 3282 // Do NOT try to parse UUID, animations cannot be triggered by ID
3355 UUID animID = InventoryKey(anim, (int)AssetType.Animation); 3283 UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation);
3356 if (animID == UUID.Zero) 3284 if (animID == UUID.Zero)
3357 presence.Animator.AddAnimation(anim, m_host.UUID); 3285 presence.Animator.AddAnimation(anim, m_host.UUID);
3358 else 3286 else
@@ -3374,7 +3302,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3374 3302
3375 if (presence != null) 3303 if (presence != null)
3376 { 3304 {
3377 UUID animID = KeyOrName(anim); 3305 UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim);
3378 3306
3379 if (animID == UUID.Zero) 3307 if (animID == UUID.Zero)
3380 presence.Animator.RemoveAnimation(anim); 3308 presence.Animator.RemoveAnimation(anim);
@@ -4319,7 +4247,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4319 4247
4320 private void DoLLTeleport(ScenePresence sp, string destination, Vector3 targetPos, Vector3 targetLookAt) 4248 private void DoLLTeleport(ScenePresence sp, string destination, Vector3 targetPos, Vector3 targetLookAt)
4321 { 4249 {
4322 UUID assetID = KeyOrName(destination); 4250 UUID assetID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, destination);
4323 4251
4324 // The destinaion is not an asset ID and also doesn't name a landmark. 4252 // The destinaion is not an asset ID and also doesn't name a landmark.
4325 // Use it as a sim name 4253 // Use it as a sim name
@@ -4386,7 +4314,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4386 m_host.AddScriptLPS(1); 4314 m_host.AddScriptLPS(1);
4387 4315
4388 // TODO: Parameter check logic required. 4316 // TODO: Parameter check logic required.
4389 m_host.CollisionSound = KeyOrName(impact_sound, AssetType.Sound); 4317 m_host.CollisionSound = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, impact_sound, AssetType.Sound);
4390 m_host.CollisionSoundVolume = (float)impact_volume; 4318 m_host.CollisionSoundVolume = (float)impact_volume;
4391 } 4319 }
4392 4320
@@ -5912,7 +5840,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5912 if (m_SoundModule != null) 5840 if (m_SoundModule != null)
5913 { 5841 {
5914 m_SoundModule.TriggerSoundLimited(m_host.UUID, 5842 m_SoundModule.TriggerSoundLimited(m_host.UUID,
5915 KeyOrName(sound, AssetType.Sound), volume, 5843 ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), volume,
5916 bottom_south_west, top_north_east); 5844 bottom_south_west, top_north_east);
5917 } 5845 }
5918 } 5846 }
@@ -6346,7 +6274,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6346 break; 6274 break;
6347 6275
6348 case (int)ScriptBaseClass.PSYS_SRC_TEXTURE: 6276 case (int)ScriptBaseClass.PSYS_SRC_TEXTURE:
6349 prules.Texture = KeyOrName(rules.GetLSLStringItem(i + 1)); 6277 prules.Texture = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, rules.GetLSLStringItem(i + 1));
6350 break; 6278 break;
6351 6279
6352 case (int)ScriptBaseClass.PSYS_SRC_BURST_RATE: 6280 case (int)ScriptBaseClass.PSYS_SRC_BURST_RATE:
@@ -7269,9 +7197,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7269 UUID sculptId; 7197 UUID sculptId;
7270 7198
7271 if (!UUID.TryParse(map, out sculptId)) 7199 if (!UUID.TryParse(map, out sculptId))
7272 { 7200 sculptId = ScriptUtils.GetAssetIdFromItemName(m_host, map, (int)AssetType.Texture);
7273 sculptId = InventoryKey(map, (int)AssetType.Texture);
7274 }
7275 7201
7276 if (sculptId == UUID.Zero) 7202 if (sculptId == UUID.Zero)
7277 return; 7203 return;
@@ -7668,6 +7594,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7668 part.ScriptSetPhysicsStatus(physics); 7594 part.ScriptSetPhysicsStatus(physics);
7669 break; 7595 break;
7670 7596
7597 case (int)ScriptBaseClass.PRIM_PHYSICS_SHAPE_TYPE:
7598 if (remain < 1)
7599 return null;
7600
7601 int shape_type = rules.GetLSLIntegerItem(idx++);
7602
7603 ExtraPhysicsData physdata = new ExtraPhysicsData();
7604 physdata.Density = part.Density;
7605 physdata.Bounce = part.Restitution;
7606 physdata.GravitationModifier = part.GravityModifier;
7607 physdata.PhysShapeType = (PhysShapeType)shape_type;
7608
7609 part.UpdateExtraPhysics(physdata);
7610
7611 break;
7612
7671 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: 7613 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
7672 if (remain < 1) 7614 if (remain < 1)
7673 return null; 7615 return null;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
index 9045672..2fe6948 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
@@ -29,8 +29,10 @@ using System;
29using System.Reflection; 29using System.Reflection;
30using System.Collections; 30using System.Collections;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Reflection;
32using System.Runtime.Remoting.Lifetime; 33using System.Runtime.Remoting.Lifetime;
33using System.Threading; 34using System.Threading;
35using log4net;
34using OpenMetaverse; 36using OpenMetaverse;
35using Nini.Config; 37using Nini.Config;
36using OpenSim; 38using OpenSim;
@@ -56,6 +58,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
56 [Serializable] 58 [Serializable]
57 public class MOD_Api : MarshalByRefObject, IMOD_Api, IScriptApi 59 public class MOD_Api : MarshalByRefObject, IMOD_Api, IScriptApi
58 { 60 {
61// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
62
59 internal IScriptEngine m_ScriptEngine; 63 internal IScriptEngine m_ScriptEngine;
60 internal SceneObjectPart m_host; 64 internal SceneObjectPart m_host;
61 internal TaskInventoryItem m_item; 65 internal TaskInventoryItem m_item;
@@ -109,8 +113,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
109 if (message.Length > 1023) 113 if (message.Length > 1023)
110 message = message.Substring(0, 1023); 114 message = message.Substring(0, 1023);
111 115
112 World.SimChat(Utils.StringToBytes(message), 116 World.SimChat(
113 ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); 117 Utils.StringToBytes(message),
118 ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL,
119 m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
114 120
115 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 121 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
116 wComm.DeliverMessage(ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.Name, m_host.UUID, message); 122 wComm.DeliverMessage(ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.Name, m_host.UUID, message);
@@ -124,6 +130,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
124 /// <returns>string result of the invocation</returns> 130 /// <returns>string result of the invocation</returns>
125 public void modInvokeN(string fname, params object[] parms) 131 public void modInvokeN(string fname, params object[] parms)
126 { 132 {
133// m_log.DebugFormat(
134// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
135// fname,
136// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
137// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
138
127 Type returntype = m_comms.LookupReturnType(fname); 139 Type returntype = m_comms.LookupReturnType(fname);
128 if (returntype != typeof(string)) 140 if (returntype != typeof(string))
129 MODError(String.Format("return type mismatch for {0}",fname)); 141 MODError(String.Format("return type mismatch for {0}",fname));
@@ -133,6 +145,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
133 145
134 public LSL_String modInvokeS(string fname, params object[] parms) 146 public LSL_String modInvokeS(string fname, params object[] parms)
135 { 147 {
148// m_log.DebugFormat(
149// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
150// fname,
151// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
152// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
153
136 Type returntype = m_comms.LookupReturnType(fname); 154 Type returntype = m_comms.LookupReturnType(fname);
137 if (returntype != typeof(string)) 155 if (returntype != typeof(string))
138 MODError(String.Format("return type mismatch for {0}",fname)); 156 MODError(String.Format("return type mismatch for {0}",fname));
@@ -143,6 +161,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
143 161
144 public LSL_Integer modInvokeI(string fname, params object[] parms) 162 public LSL_Integer modInvokeI(string fname, params object[] parms)
145 { 163 {
164// m_log.DebugFormat(
165// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
166// fname,
167// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
168// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
169
146 Type returntype = m_comms.LookupReturnType(fname); 170 Type returntype = m_comms.LookupReturnType(fname);
147 if (returntype != typeof(int)) 171 if (returntype != typeof(int))
148 MODError(String.Format("return type mismatch for {0}",fname)); 172 MODError(String.Format("return type mismatch for {0}",fname));
@@ -153,6 +177,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
153 177
154 public LSL_Float modInvokeF(string fname, params object[] parms) 178 public LSL_Float modInvokeF(string fname, params object[] parms)
155 { 179 {
180// m_log.DebugFormat(
181// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
182// fname,
183// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
184// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
185
156 Type returntype = m_comms.LookupReturnType(fname); 186 Type returntype = m_comms.LookupReturnType(fname);
157 if (returntype != typeof(float)) 187 if (returntype != typeof(float))
158 MODError(String.Format("return type mismatch for {0}",fname)); 188 MODError(String.Format("return type mismatch for {0}",fname));
@@ -163,6 +193,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
163 193
164 public LSL_Key modInvokeK(string fname, params object[] parms) 194 public LSL_Key modInvokeK(string fname, params object[] parms)
165 { 195 {
196// m_log.DebugFormat(
197// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
198// fname,
199// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
200// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
201
166 Type returntype = m_comms.LookupReturnType(fname); 202 Type returntype = m_comms.LookupReturnType(fname);
167 if (returntype != typeof(UUID)) 203 if (returntype != typeof(UUID))
168 MODError(String.Format("return type mismatch for {0}",fname)); 204 MODError(String.Format("return type mismatch for {0}",fname));
@@ -173,6 +209,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
173 209
174 public LSL_Vector modInvokeV(string fname, params object[] parms) 210 public LSL_Vector modInvokeV(string fname, params object[] parms)
175 { 211 {
212// m_log.DebugFormat(
213// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
214// fname,
215// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
216// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
217
176 Type returntype = m_comms.LookupReturnType(fname); 218 Type returntype = m_comms.LookupReturnType(fname);
177 if (returntype != typeof(OpenMetaverse.Vector3)) 219 if (returntype != typeof(OpenMetaverse.Vector3))
178 MODError(String.Format("return type mismatch for {0}",fname)); 220 MODError(String.Format("return type mismatch for {0}",fname));
@@ -183,6 +225,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
183 225
184 public LSL_Rotation modInvokeR(string fname, params object[] parms) 226 public LSL_Rotation modInvokeR(string fname, params object[] parms)
185 { 227 {
228// m_log.DebugFormat(
229// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
230// fname,
231// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
232// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
233
186 Type returntype = m_comms.LookupReturnType(fname); 234 Type returntype = m_comms.LookupReturnType(fname);
187 if (returntype != typeof(OpenMetaverse.Quaternion)) 235 if (returntype != typeof(OpenMetaverse.Quaternion))
188 MODError(String.Format("return type mismatch for {0}",fname)); 236 MODError(String.Format("return type mismatch for {0}",fname));
@@ -193,6 +241,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
193 241
194 public LSL_List modInvokeL(string fname, params object[] parms) 242 public LSL_List modInvokeL(string fname, params object[] parms)
195 { 243 {
244// m_log.DebugFormat(
245// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
246// fname,
247// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
248// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
249
196 Type returntype = m_comms.LookupReturnType(fname); 250 Type returntype = m_comms.LookupReturnType(fname);
197 if (returntype != typeof(object[])) 251 if (returntype != typeof(object[]))
198 MODError(String.Format("return type mismatch for {0}",fname)); 252 MODError(String.Format("return type mismatch for {0}",fname));
@@ -250,6 +304,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
250 return ""; 304 return "";
251 } 305 }
252 306
307// m_log.DebugFormat(
308// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
309// fname,
310// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
311// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
312
253 Type[] signature = m_comms.LookupTypeSignature(fname); 313 Type[] signature = m_comms.LookupTypeSignature(fname);
254 if (signature.Length != parms.Length) 314 if (signature.Length != parms.Length)
255 MODError(String.Format("wrong number of parameters to function {0}",fname)); 315 MODError(String.Format("wrong number of parameters to function {0}",fname));
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
index d173db0..3c01eec 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.7.5.*")] 32[assembly: AssemblyVersion("0.7.6.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 9bf1a64..bd66ba3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -661,6 +661,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
661 public const int PRIM_MEDIA_PERM_GROUP = 2; 661 public const int PRIM_MEDIA_PERM_GROUP = 2;
662 public const int PRIM_MEDIA_PERM_ANYONE = 4; 662 public const int PRIM_MEDIA_PERM_ANYONE = 4;
663 663
664 public const int PRIM_PHYSICS_SHAPE_TYPE = 30;
665 public const int PRIM_PHYSICS_SHAPE_PRIM = 0;
666 public const int PRIM_PHYSICS_SHAPE_CONVEX = 2;
667 public const int PRIM_PHYSICS_SHAPE_NONE = 1;
668
669 public const int PRIM_PHYSICS_MATERIAL = 31;
670 public const int DENSITY = 1;
671 public const int FRICTION = 2;
672 public const int RESTITUTION = 4;
673 public const int GRAVITY_MULTIPLIER = 8;
674
664 // extra constants for llSetPrimMediaParams 675 // extra constants for llSetPrimMediaParams
665 public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); 676 public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0);
666 public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = new LSLInteger(1000); 677 public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = new LSLInteger(1000);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
index 573a803..b1825ac 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.7.5.*")] 32[assembly: AssemblyVersion("0.7.6.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs
index f6d5d41..342dbff 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.7.5.*")] 32[assembly: AssemblyVersion("0.7.6.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
index c65caa8..fd37753 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.7.5.*")] 32[assembly: AssemblyVersion("0.7.6.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
index 470e1a1..74747a2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.7.5.*")] 32[assembly: AssemblyVersion("0.7.6.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
index e6e8777..d08b0a6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.7.5.*")] 32[assembly: AssemblyVersion("0.7.6.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
index bd26a8b..a887171 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32[assembly: AssemblyVersion("0.7.5.*")] 32[assembly: AssemblyVersion("0.7.6.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]