aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorubit2013-04-28 19:46:57 +0200
committerubit2013-04-28 19:46:57 +0200
commit7000b52aebcceb30163cf040a9d1b08e9bfd8412 (patch)
treee89cfcfec895c13fb6c7919580819700fa8815a3 /OpenSim/Region/ScriptEngine
parentMerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
parentMake sharing errors not spew and let the cache retry the files (diff)
downloadopensim-SC-7000b52aebcceb30163cf040a9d1b08e9bfd8412.zip
opensim-SC-7000b52aebcceb30163cf040a9d1b08e9bfd8412.tar.gz
opensim-SC-7000b52aebcceb30163cf040a9d1b08e9bfd8412.tar.bz2
opensim-SC-7000b52aebcceb30163cf040a9d1b08e9bfd8412.tar.xz
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs22
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs2
6 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 53c6e5c..7be64eb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3332,7 +3332,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3332 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; 3332 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
3333 3333
3334 if (attachmentsModule != null) 3334 if (attachmentsModule != null)
3335 return attachmentsModule.AttachObject(presence, grp, (uint)attachmentPoint, false, true, false); 3335 return attachmentsModule.AttachObject(presence, grp, (uint)attachmentPoint, false, true, false, true);
3336 else 3336 else
3337 return false; 3337 return false;
3338 } 3338 }
@@ -4724,7 +4724,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4724 UUID av = new UUID(); 4724 UUID av = new UUID();
4725 if (!UUID.TryParse(agent,out av)) 4725 if (!UUID.TryParse(agent,out av))
4726 { 4726 {
4727 //LSLError("First parameter to llDialog needs to be a key");
4728 return; 4727 return;
4729 } 4728 }
4730 4729
@@ -7222,20 +7221,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7222 } 7221 }
7223 if (buttons.Length > 12) 7222 if (buttons.Length > 12)
7224 { 7223 {
7225 LSLError("No more than 12 buttons can be shown"); 7224 ShoutError("button list too long, must be 12 or fewer entries");
7226 return;
7227 } 7225 }
7228 string[] buts = new string[buttons.Length]; 7226 int length = buttons.Length;
7229 for (int i = 0; i < buttons.Length; i++) 7227 if (length > 12)
7228 length = 12;
7229
7230 string[] buts = new string[length];
7231 for (int i = 0; i < length; i++)
7230 { 7232 {
7231 if (buttons.Data[i].ToString() == String.Empty) 7233 if (buttons.Data[i].ToString() == String.Empty)
7232 { 7234 {
7233 LSLError("button label cannot be blank"); 7235 ShoutError("button label cannot be blank");
7234 return; 7236 return;
7235 } 7237 }
7236 if (buttons.Data[i].ToString().Length > 24) 7238 if (buttons.Data[i].ToString().Length > 24)
7237 { 7239 {
7238 llWhisper(ScriptBaseClass.DEBUG_CHANNEL, "button label cannot be longer than 24 characters"); 7240 ShoutError("button label cannot be longer than 24 characters");
7239 return; 7241 return;
7240 } 7242 }
7241 buts[i] = buttons.Data[i].ToString(); 7243 buts[i] = buttons.Data[i].ToString();
@@ -7843,7 +7845,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7843 physdata.PhysShapeType = (PhysShapeType)part.PhysicsShapeType; 7845 physdata.PhysShapeType = (PhysShapeType)part.PhysicsShapeType;
7844 physdata.Density = part.Density; 7846 physdata.Density = part.Density;
7845 physdata.Friction = part.Friction; 7847 physdata.Friction = part.Friction;
7846 physdata.Bounce = part.Bounciness; 7848 physdata.Bounce = part.Restitution;
7847 physdata.GravitationModifier = part.GravityModifier; 7849 physdata.GravitationModifier = part.GravityModifier;
7848 7850
7849 if ((material_bits & (int)ScriptBaseClass.DENSITY) != 0) 7851 if ((material_bits & (int)ScriptBaseClass.DENSITY) != 0)
@@ -8236,7 +8238,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8236 8238
8237 ExtraPhysicsData physdata = new ExtraPhysicsData(); 8239 ExtraPhysicsData physdata = new ExtraPhysicsData();
8238 physdata.Density = part.Density; 8240 physdata.Density = part.Density;
8239 physdata.Bounce = part.Bounciness; 8241 physdata.Bounce = part.Restitution;
8240 physdata.GravitationModifier = part.GravityModifier; 8242 physdata.GravitationModifier = part.GravityModifier;
8241 physdata.PhysShapeType = (PhysShapeType)shape_type; 8243 physdata.PhysShapeType = (PhysShapeType)shape_type;
8242 8244
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
index 8f34833..ee89f9d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
123 public void modInvokeN(string fname, params object[] parms) 123 public void modInvokeN(string fname, params object[] parms)
124 { 124 {
125 Type returntype = m_comms.LookupReturnType(fname); 125 Type returntype = m_comms.LookupReturnType(fname);
126 if (returntype != typeof(string)) 126 if (returntype != typeof(void))
127 MODError(String.Format("return type mismatch for {0}",fname)); 127 MODError(String.Format("return type mismatch for {0}",fname));
128 128
129 modInvoke(fname,parms); 129 modInvoke(fname,parms);
@@ -264,6 +264,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
264 if (result != null) 264 if (result != null)
265 return result; 265 return result;
266 266
267 Type returntype = m_comms.LookupReturnType(fname);
268 if (returntype == typeof(void))
269 return null;
270
267 MODError(String.Format("Invocation of {0} failed; null return value",fname)); 271 MODError(String.Format("Invocation of {0} failed; null return value",fname));
268 } 272 }
269 catch (Exception e) 273 catch (Exception e)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 7c2f8ed..8aac33f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1619,7 +1619,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1619 } 1619 }
1620 } 1620 }
1621 1621
1622 public Object osParseJSONNew(string JSON) 1622 private Object osParseJSONNew(string JSON)
1623 { 1623 {
1624 CheckThreatLevel(ThreatLevel.None, "osParseJSONNew"); 1624 CheckThreatLevel(ThreatLevel.None, "osParseJSONNew");
1625 1625
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index c447d1f..8aa1249 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -259,7 +259,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
259 259
260 string osGetScriptEngineName(); 260 string osGetScriptEngineName();
261 string osGetSimulatorVersion(); 261 string osGetSimulatorVersion();
262 Object osParseJSONNew(string JSON);
263 Hashtable osParseJSON(string JSON); 262 Hashtable osParseJSON(string JSON);
264 263
265 void osMessageObject(key objectUUID,string message); 264 void osMessageObject(key objectUUID,string message);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index afa9ae0..95dff18 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -430,11 +430,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
430 return m_OSSL_Functions.osParseJSON(JSON); 430 return m_OSSL_Functions.osParseJSON(JSON);
431 } 431 }
432 432
433 public Object osParseJSONNew(string JSON)
434 {
435 return m_OSSL_Functions.osParseJSONNew(JSON);
436 }
437
438 public void osMessageObject(key objectUUID,string message) 433 public void osMessageObject(key objectUUID,string message)
439 { 434 {
440 m_OSSL_Functions.osMessageObject(objectUUID,message); 435 m_OSSL_Functions.osMessageObject(objectUUID,message);
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index c9c4753..c6393ed 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -512,7 +512,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
512 else if (o is LSL_Types.LSLFloat) 512 else if (o is LSL_Types.LSLFloat)
513 size += 8; 513 size += 8;
514 else if (o is LSL_Types.LSLString) 514 else if (o is LSL_Types.LSLString)
515 size += ((LSL_Types.LSLString)o).m_string.Length; 515 size += ((LSL_Types.LSLString)o).m_string == null ? 0 : ((LSL_Types.LSLString)o).m_string.Length;
516 else if (o is LSL_Types.key) 516 else if (o is LSL_Types.key)
517 size += ((LSL_Types.key)o).value.Length; 517 size += ((LSL_Types.key)o).value.Length;
518 else if (o is LSL_Types.Vector3) 518 else if (o is LSL_Types.Vector3)