aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorCasperW2009-12-26 18:17:55 +0100
committerCasperW2009-12-26 18:17:55 +0100
commit1b8f91a0db3dd636a86fc20ff1f8496474899925 (patch)
tree48274af2007b977d9dca28c702644d60559b1f01 /OpenSim/Region/ScriptEngine
parentFix for landing points. Only one scenario is not fully covered by this change... (diff)
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC_OLD-1b8f91a0db3dd636a86fc20ff1f8496474899925.zip
opensim-SC_OLD-1b8f91a0db3dd636a86fc20ff1f8496474899925.tar.gz
opensim-SC_OLD-1b8f91a0db3dd636a86fc20ff1f8496474899925.tar.bz2
opensim-SC_OLD-1b8f91a0db3dd636a86fc20ff1f8496474899925.tar.xz
Merge branch 'master' into casper
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs38
2 files changed, 40 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index cc903e0..c9d6742 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6606,6 +6606,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6606 // retain pathcurve 6606 // retain pathcurve
6607 shapeBlock.PathCurve = part.Shape.PathCurve; 6607 shapeBlock.PathCurve = part.Shape.PathCurve;
6608 6608
6609 part.Shape.SculptEntry = false;
6609 return shapeBlock; 6610 return shapeBlock;
6610 } 6611 }
6611 6612
@@ -6657,6 +6658,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6657 shapeBlock.PathShearX = (byte)(100 * topshear.x); 6658 shapeBlock.PathShearX = (byte)(100 * topshear.x);
6658 shapeBlock.PathShearY = (byte)(100 * topshear.y); 6659 shapeBlock.PathShearY = (byte)(100 * topshear.y);
6659 6660
6661 part.Shape.SculptEntry = false;
6660 part.UpdateShape(shapeBlock); 6662 part.UpdateShape(shapeBlock);
6661 } 6663 }
6662 6664
@@ -6701,6 +6703,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6701 shapeBlock.ProfileBegin = (ushort)(50000 * dimple.x); 6703 shapeBlock.ProfileBegin = (ushort)(50000 * dimple.x);
6702 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - dimple.y)); 6704 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - dimple.y));
6703 6705
6706 part.Shape.SculptEntry = false;
6704 part.UpdateShape(shapeBlock); 6707 part.UpdateShape(shapeBlock);
6705 } 6708 }
6706 6709
@@ -6824,6 +6827,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6824 } 6827 }
6825 shapeBlock.PathSkew = (sbyte)(100 * skew); 6828 shapeBlock.PathSkew = (sbyte)(100 * skew);
6826 6829
6830 part.Shape.SculptEntry = false;
6827 part.UpdateShape(shapeBlock); 6831 part.UpdateShape(shapeBlock);
6828 } 6832 }
6829 6833
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 1fc31c5..faf9c40 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -422,7 +422,8 @@ namespace OpenSim.Region.ScriptEngine.Shared
422 422
423 public int Length 423 public int Length
424 { 424 {
425 get { 425 get
426 {
426 if (m_data == null) 427 if (m_data == null)
427 m_data=new Object[0]; 428 m_data=new Object[0];
428 return m_data.Length; 429 return m_data.Length;
@@ -431,7 +432,40 @@ namespace OpenSim.Region.ScriptEngine.Shared
431 432
432 public int Size 433 public int Size
433 { 434 {
434 get { return 0; } 435 get
436 {
437 if (m_data == null)
438 m_data=new Object[0];
439
440 int size = 0;
441
442 foreach (Object o in m_data)
443 {
444 if (o is LSL_Types.LSLInteger)
445 size += 4;
446 else if (o is LSL_Types.LSLFloat)
447 size += 8;
448 else if (o is LSL_Types.LSLString)
449 size += ((LSL_Types.LSLString)o).m_string.Length;
450 else if (o is LSL_Types.key)
451 size += ((LSL_Types.key)o).value.Length;
452 else if (o is LSL_Types.Vector3)
453 size += 32;
454 else if (o is LSL_Types.Quaternion)
455 size += 64;
456 else if (o is int)
457 size += 4;
458 else if (o is string)
459 size += ((string)o).Length;
460 else if (o is float)
461 size += 8;
462 else if (o is double)
463 size += 16;
464 else
465 throw new Exception("Unknown type in List.Size: " + o.GetType().ToString());
466 }
467 return size;
468 }
435 } 469 }
436 470
437 public object[] Data 471 public object[] Data