aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs204
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs24
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs2
6 files changed, 121 insertions, 121 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 25c0d9a..9195063 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -361,23 +361,23 @@ namespace OpenSim.Region.ScriptEngine.Common
361 a vector pointing along the X axis, first rotating it 3 degrees around the global Z axis, then rotating the resulting 361 a vector pointing along the X axis, first rotating it 3 degrees around the global Z axis, then rotating the resulting
362 vector 2 degrees around the global Y axis, and finally rotating that 1 degree around the global X axis. 362 vector 2 degrees around the global Y axis, and finally rotating that 1 degree around the global X axis.
363 */ 363 */
364 364
365 /* How we arrived at this llEuler2Rot 365 /* How we arrived at this llEuler2Rot
366 * 366 *
367 * Experiment in SL to determine conventions: 367 * Experiment in SL to determine conventions:
368 * llEuler2Rot(<PI,0,0>)=<1,0,0,0> 368 * llEuler2Rot(<PI,0,0>)=<1,0,0,0>
369 * llEuler2Rot(<0,PI,0>)=<0,1,0,0> 369 * llEuler2Rot(<0,PI,0>)=<0,1,0,0>
370 * llEuler2Rot(<0,0,PI>)=<0,0,1,0> 370 * llEuler2Rot(<0,0,PI>)=<0,0,1,0>
371 * 371 *
372 * Important facts about Quaternions 372 * Important facts about Quaternions
373 * - multiplication is non-commutative (a*b != b*a) 373 * - multiplication is non-commutative (a*b != b*a)
374 * - http://en.wikipedia.org/wiki/Quaternion#Basis_multiplication 374 * - http://en.wikipedia.org/wiki/Quaternion#Basis_multiplication
375 * 375 *
376 * Above SL experiment gives (c1,c2,c3,s1,s2,s3 as defined in our llEuler2Rot): 376 * Above SL experiment gives (c1,c2,c3,s1,s2,s3 as defined in our llEuler2Rot):
377 * Qx = c1+i*s1 377 * Qx = c1+i*s1
378 * Qy = c2+j*s2; 378 * Qy = c2+j*s2;
379 * Qz = c3+k*s3; 379 * Qz = c3+k*s3;
380 * 380 *
381 * Rotations applied in order (from above) Z, Y, X 381 * Rotations applied in order (from above) Z, Y, X
382 * Q = (Qz * Qy) * Qx 382 * Q = (Qz * Qy) * Qx
383 * ((c1+i*s1)*(c2+j*s2))*(c3+k*s3) 383 * ((c1+i*s1)*(c2+j*s2))*(c3+k*s3)
@@ -389,23 +389,23 @@ namespace OpenSim.Region.ScriptEngine.Common
389 * y=j*(c1*s2*c3-s1*c2*s3) 389 * y=j*(c1*s2*c3-s1*c2*s3)
390 * z=k*(s1*s2*c3+c1*c2*s3) 390 * z=k*(s1*s2*c3+c1*c2*s3)
391 * s= c1*c2*c3-s1*s2*s3 391 * s= c1*c2*c3-s1*s2*s3
392 * 392 *
393 * This implementation agrees with the functions found here: 393 * This implementation agrees with the functions found here:
394 * http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions 394 * http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions
395 * And with the results in SL. 395 * And with the results in SL.
396 * 396 *
397 * It's also possible to calculate llEuler2Rot by direct multiplication of 397 * It's also possible to calculate llEuler2Rot by direct multiplication of
398 * the Qz, Qy, and Qx vectors (as above - and done in the "accurate" function 398 * the Qz, Qy, and Qx vectors (as above - and done in the "accurate" function
399 * from the wiki). 399 * from the wiki).
400 * Apparently in some cases this is better from a numerical precision perspective? 400 * Apparently in some cases this is better from a numerical precision perspective?
401 */ 401 */
402 402
403 public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v) 403 public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v)
404 { 404 {
405 m_host.AddScriptLPS(1); 405 m_host.AddScriptLPS(1);
406 406
407 double x,y,z,s; 407 double x,y,z,s;
408 408
409 double c1 = Math.Cos(v.x/2.0); 409 double c1 = Math.Cos(v.x/2.0);
410 double c2 = Math.Cos(v.y/2.0); 410 double c2 = Math.Cos(v.y/2.0);
411 double c3 = Math.Cos(v.z/2.0); 411 double c3 = Math.Cos(v.z/2.0);
@@ -417,7 +417,7 @@ namespace OpenSim.Region.ScriptEngine.Common
417 y = c1*s2*c3-s1*c2*s3; 417 y = c1*s2*c3-s1*c2*s3;
418 z = s1*s2*c3+c1*c2*s3; 418 z = s1*s2*c3+c1*c2*s3;
419 s = c1*c2*c3-s1*s2*s3; 419 s = c1*c2*c3-s1*s2*s3;
420 420
421 return new LSL_Types.Quaternion(x, y, z, s); 421 return new LSL_Types.Quaternion(x, y, z, s);
422 } 422 }
423 423
@@ -427,7 +427,7 @@ namespace OpenSim.Region.ScriptEngine.Common
427 double x,y,z,s; 427 double x,y,z,s;
428 int f=0; 428 int f=0;
429 // Important Note: q1=<x,y,z,s> is equal to q2=<-x,-y,-z,-s> 429 // Important Note: q1=<x,y,z,s> is equal to q2=<-x,-y,-z,-s>
430 // Computing quaternion x,y,z,s values 430 // Computing quaternion x,y,z,s values
431 x = ((fwd.x - left.y - up.z + 1) / 4); 431 x = ((fwd.x - left.y - up.z + 1) / 4);
432 x *= x; 432 x *= x;
433 x = Math.Sqrt(Math.Sqrt(x)); 433 x = Math.Sqrt(Math.Sqrt(x));
@@ -441,7 +441,7 @@ namespace OpenSim.Region.ScriptEngine.Common
441 s *= s; 441 s *= s;
442 s = Math.Sqrt(Math.Sqrt(s)); 442 s = Math.Sqrt(Math.Sqrt(s));
443 443
444 // Set f for signs detection 444 // Set f for signs detection
445 if (fwd.y+left.x >= 0){f+=1;} 445 if (fwd.y+left.x >= 0){f+=1;}
446 if (fwd.z+up.x >= 0){f+=2;} 446 if (fwd.z+up.x >= 0){f+=2;}
447 if (left.z-up.y >= 0){f+=4;} 447 if (left.z-up.y >= 0){f+=4;}
@@ -510,7 +510,7 @@ namespace OpenSim.Region.ScriptEngine.Common
510 x = 2 * (r.x * r.y - r.z * r.s); 510 x = 2 * (r.x * r.y - r.z * r.s);
511 y = -r.x * r.x + r.y * r.y - r.z * r.z + r.s * r.s; 511 y = -r.x * r.x + r.y * r.y - r.z * r.z + r.s * r.s;
512 z = 2 * (r.x * r.s + r.y * r.z); 512 z = 2 * (r.x * r.s + r.y * r.z);
513 return (new LSL_Types.Vector3(x, y, z)); 513 return (new LSL_Types.Vector3(x, y, z));
514 } 514 }
515 515
516 public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) 516 public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r)
@@ -536,7 +536,7 @@ namespace OpenSim.Region.ScriptEngine.Common
536 z = -r.x * r.x - r.y * r.y + r.z * r.z + r.s * r.s; 536 z = -r.x * r.x - r.y * r.y + r.z * r.z + r.s * r.s;
537 return (new LSL_Types.Vector3(x, y, z)); 537 return (new LSL_Types.Vector3(x, y, z));
538 } 538 }
539 539
540 public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 a, LSL_Types.Vector3 b) 540 public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 a, LSL_Types.Vector3 b)
541 { 541 {
542 //A and B should both be normalized 542 //A and B should both be normalized
@@ -1215,7 +1215,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1215 1215
1216 /// <summary> 1216 /// <summary>
1217 /// Set flexi parameters of a part. 1217 /// Set flexi parameters of a part.
1218 /// 1218 ///
1219 /// FIXME: Much of this code should probably be within the part itself. 1219 /// FIXME: Much of this code should probably be within the part itself.
1220 /// </summary> 1220 /// </summary>
1221 /// <param name="part"></param> 1221 /// <param name="part"></param>
@@ -1226,7 +1226,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1226 /// <param name="wind"></param> 1226 /// <param name="wind"></param>
1227 /// <param name="tension"></param> 1227 /// <param name="tension"></param>
1228 /// <param name="Force"></param> 1228 /// <param name="Force"></param>
1229 private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, 1229 private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction,
1230 float wind, float tension, LSL_Types.Vector3 Force) 1230 float wind, float tension, LSL_Types.Vector3 Force)
1231 { 1231 {
1232 if (part == null) 1232 if (part == null)
@@ -1239,7 +1239,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1239 { 1239 {
1240 needs_fakedelete = true; 1240 needs_fakedelete = true;
1241 } 1241 }
1242 part.Shape.FlexiEntry = true; // this setting flexi true isn't working, but the below parameters do 1242 part.Shape.FlexiEntry = true; // this setting flexi true isn't working, but the below parameters do
1243 // work once the prim is already flexi 1243 // work once the prim is already flexi
1244 part.Shape.FlexiSoftness = softness; 1244 part.Shape.FlexiSoftness = softness;
1245 part.Shape.FlexiGravity = gravity; 1245 part.Shape.FlexiGravity = gravity;
@@ -1265,7 +1265,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1265 if (needs_fakedelete) 1265 if (needs_fakedelete)
1266 { 1266 {
1267 if (part.ParentGroup != null) 1267 if (part.ParentGroup != null)
1268 { 1268 {
1269 part.ParentGroup.FakeDeleteGroup(); 1269 part.ParentGroup.FakeDeleteGroup();
1270 } 1270 }
1271 } 1271 }
@@ -1276,7 +1276,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1276 1276
1277 /// <summary> 1277 /// <summary>
1278 /// Set a light point on a part 1278 /// Set a light point on a part
1279 /// 1279 ///
1280 /// FIXME: Much of this code should probably be in SceneObjectGroup 1280 /// FIXME: Much of this code should probably be in SceneObjectGroup
1281 /// </summary> 1281 /// </summary>
1282 /// <param name="part"></param> 1282 /// <param name="part"></param>
@@ -1781,7 +1781,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1781 m_host.SoundGain = volume; 1781 m_host.SoundGain = volume;
1782 m_host.SoundFlags = 1; // looping 1782 m_host.SoundFlags = 1; // looping
1783 m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable? 1783 m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
1784 1784
1785 m_host.ScheduleFullUpdate(); 1785 m_host.ScheduleFullUpdate();
1786 m_host.SendFullUpdateToAllClients(); 1786 m_host.SendFullUpdateToAllClients();
1787 } 1787 }
@@ -2908,13 +2908,13 @@ namespace OpenSim.Region.ScriptEngine.Common
2908 bool found = false; 2908 bool found = false;
2909 LLUUID destId = LLUUID.Zero; 2909 LLUUID destId = LLUUID.Zero;
2910 LLUUID objId = LLUUID.Zero; 2910 LLUUID objId = LLUUID.Zero;
2911 2911
2912 if (!LLUUID.TryParse(destination, out destId)) 2912 if (!LLUUID.TryParse(destination, out destId))
2913 { 2913 {
2914 llSay(0, "Could not parse key " + destination); 2914 llSay(0, "Could not parse key " + destination);
2915 return; 2915 return;
2916 } 2916 }
2917 2917
2918 // move the first object found with this inventory name 2918 // move the first object found with this inventory name
2919 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2919 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
2920 { 2920 {
@@ -2931,7 +2931,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2931 llSay(0, String.Format("Could not find object '{0}'", inventory)); 2931 llSay(0, String.Format("Could not find object '{0}'", inventory));
2932 throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory)); 2932 throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory));
2933 } 2933 }
2934 2934
2935 // check if destination is an avatar 2935 // check if destination is an avatar
2936 if (World.GetScenePresence(destId) != null) 2936 if (World.GetScenePresence(destId) != null)
2937 { 2937 {
@@ -2993,7 +2993,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2993 { 2993 {
2994 LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest( 2994 LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest(
2995 m_localID, m_itemID, item.AssetID.ToString()); 2995 m_localID, m_itemID, item.AssetID.ToString());
2996 2996
2997 LLVector3 region = new LLVector3( 2997 LLVector3 region = new LLVector3(
2998 World.RegionInfo.RegionLocX * Constants.RegionSize, 2998 World.RegionInfo.RegionLocX * Constants.RegionSize,
2999 World.RegionInfo.RegionLocY * Constants.RegionSize, 2999 World.RegionInfo.RegionLocY * Constants.RegionSize,
@@ -4155,13 +4155,13 @@ namespace OpenSim.Region.ScriptEngine.Common
4155 if (LLUUID.TryParse(id,out key)) 4155 if (LLUUID.TryParse(id,out key))
4156 { 4156 {
4157 ScenePresence presence = World.GetScenePresence(key); 4157 ScenePresence presence = World.GetScenePresence(key);
4158 4158
4159 if (presence != null) 4159 if (presence != null)
4160 { 4160 {
4161 return presence.ControllingClient.Name; 4161 return presence.ControllingClient.Name;
4162 //return presence.Name; 4162 //return presence.Name;
4163 } 4163 }
4164 4164
4165 if (World.GetSceneObjectPart(key) != null) 4165 if (World.GetSceneObjectPart(key) != null)
4166 { 4166 {
4167 return World.GetSceneObjectPart(key).Name; 4167 return World.GetSceneObjectPart(key).Name;
@@ -4516,7 +4516,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4516 private Primitive.ParticleSystem getNewParticleSystemWithSLDefaultValues() 4516 private Primitive.ParticleSystem getNewParticleSystemWithSLDefaultValues()
4517 { 4517 {
4518 Primitive.ParticleSystem ps = new Primitive.ParticleSystem(); 4518 Primitive.ParticleSystem ps = new Primitive.ParticleSystem();
4519 4519
4520 // TODO find out about the other defaults and add them here 4520 // TODO find out about the other defaults and add them here
4521 ps.PartStartColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); 4521 ps.PartStartColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f);
4522 ps.PartEndColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); 4522 ps.PartEndColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f);
@@ -4530,7 +4530,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4530 ps.PartMaxAge = 10.0f; 4530 ps.PartMaxAge = 10.0f;
4531 return ps; 4531 return ps;
4532 } 4532 }
4533 4533
4534 public void llParticleSystem(LSL_Types.list rules) 4534 public void llParticleSystem(LSL_Types.list rules)
4535 { 4535 {
4536 m_host.AddScriptLPS(1); 4536 m_host.AddScriptLPS(1);
@@ -4725,7 +4725,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4725 itemList.Add(itemID); 4725 itemList.Add(itemID);
4726 } 4726 }
4727 } 4727 }
4728 4728
4729 if (itemList.Count == 0) 4729 if (itemList.Count == 0)
4730 return; 4730 return;
4731 4731
@@ -4973,7 +4973,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4973 public void llSetRemoteScriptAccessPin(int pin) 4973 public void llSetRemoteScriptAccessPin(int pin)
4974 { 4974 {
4975 m_host.AddScriptLPS(1); 4975 m_host.AddScriptLPS(1);
4976 4976
4977 m_host.ScriptAccessPin = pin; 4977 m_host.ScriptAccessPin = pin;
4978 } 4978 }
4979 4979
@@ -4983,19 +4983,19 @@ namespace OpenSim.Region.ScriptEngine.Common
4983 bool found = false; 4983 bool found = false;
4984 LLUUID destId = LLUUID.Zero; 4984 LLUUID destId = LLUUID.Zero;
4985 LLUUID srcId = LLUUID.Zero; 4985 LLUUID srcId = LLUUID.Zero;
4986 4986
4987 if (!LLUUID.TryParse(target, out destId)) 4987 if (!LLUUID.TryParse(target, out destId))
4988 { 4988 {
4989 llSay(0, "Could not parse key " + target); 4989 llSay(0, "Could not parse key " + target);
4990 return; 4990 return;
4991 } 4991 }
4992 4992
4993 // target must be a different prim than the one containing the script 4993 // target must be a different prim than the one containing the script
4994 if (m_host.UUID == destId) 4994 if (m_host.UUID == destId)
4995 { 4995 {
4996 return; 4996 return;
4997 } 4997 }
4998 4998
4999 // copy the first script found with this inventory name 4999 // copy the first script found with this inventory name
5000 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 5000 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
5001 { 5001 {
@@ -5010,13 +5010,13 @@ namespace OpenSim.Region.ScriptEngine.Common
5010 } 5010 }
5011 } 5011 }
5012 } 5012 }
5013 5013
5014 if (!found) 5014 if (!found)
5015 { 5015 {
5016 llSay(0, "Could not find script " + name); 5016 llSay(0, "Could not find script " + name);
5017 return; 5017 return;
5018 } 5018 }
5019 5019
5020 // the rest of the permission checks are done in RezScript, so check the pin there as well 5020 // the rest of the permission checks are done in RezScript, so check the pin there as well
5021 World.RezScript(srcId, m_host, destId, pin, running, start_param); 5021 World.RezScript(srcId, m_host, destId, pin, running, start_param);
5022 // this will cause the delay even if the script pin or permissions were wrong - seems ok 5022 // this will cause the delay even if the script pin or permissions were wrong - seems ok
@@ -5066,11 +5066,11 @@ namespace OpenSim.Region.ScriptEngine.Common
5066 m_host.AddScriptLPS(1); 5066 m_host.AddScriptLPS(1);
5067 return Util.Md5Hash(src + ":" + nonce.ToString()); 5067 return Util.Md5Hash(src + ":" + nonce.ToString());
5068 } 5068 }
5069 5069
5070 private ObjectShapePacket.ObjectDataBlock SetPrimitiveShapeParams(int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist) 5070 private ObjectShapePacket.ObjectDataBlock SetPrimitiveShapeParams(int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist)
5071 { 5071 {
5072 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); 5072 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
5073 5073
5074 if (holeshape != (int)BuiltIn_Commands_BaseClass.PRIM_HOLE_DEFAULT && 5074 if (holeshape != (int)BuiltIn_Commands_BaseClass.PRIM_HOLE_DEFAULT &&
5075 holeshape != (int)BuiltIn_Commands_BaseClass.PRIM_HOLE_CIRCLE && 5075 holeshape != (int)BuiltIn_Commands_BaseClass.PRIM_HOLE_CIRCLE &&
5076 holeshape != (int)BuiltIn_Commands_BaseClass.PRIM_HOLE_SQUARE && 5076 holeshape != (int)BuiltIn_Commands_BaseClass.PRIM_HOLE_SQUARE &&
@@ -5128,23 +5128,23 @@ namespace OpenSim.Region.ScriptEngine.Common
5128 } 5128 }
5129 shapeBlock.PathTwistBegin = (sbyte)(200 * twist.x); 5129 shapeBlock.PathTwistBegin = (sbyte)(200 * twist.x);
5130 shapeBlock.PathTwist = (sbyte)(200 * twist.y); 5130 shapeBlock.PathTwist = (sbyte)(200 * twist.y);
5131 5131
5132 shapeBlock.ObjectLocalID = m_host.LocalId; 5132 shapeBlock.ObjectLocalID = m_host.LocalId;
5133 5133
5134 // retain pathcurve 5134 // retain pathcurve
5135 shapeBlock.PathCurve = m_host.Shape.PathCurve; 5135 shapeBlock.PathCurve = m_host.Shape.PathCurve;
5136 5136
5137 return shapeBlock; 5137 return shapeBlock;
5138 } 5138 }
5139 5139
5140 private void SetPrimitiveShapeParams(int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 taper_b, LSL_Types.Vector3 topshear, byte fudge) 5140 private void SetPrimitiveShapeParams(int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 taper_b, LSL_Types.Vector3 topshear, byte fudge)
5141 { 5141 {
5142 ObjectShapePacket.ObjectDataBlock shapeBlock; 5142 ObjectShapePacket.ObjectDataBlock shapeBlock;
5143 5143
5144 shapeBlock = SetPrimitiveShapeParams(holeshape, cut, hollow, twist); 5144 shapeBlock = SetPrimitiveShapeParams(holeshape, cut, hollow, twist);
5145 5145
5146 shapeBlock.ProfileCurve += fudge; 5146 shapeBlock.ProfileCurve += fudge;
5147 5147
5148 if (taper_b.x < 0f) 5148 if (taper_b.x < 0f)
5149 { 5149 {
5150 taper_b.x = 0f; 5150 taper_b.x = 0f;
@@ -5181,25 +5181,25 @@ namespace OpenSim.Region.ScriptEngine.Common
5181 } 5181 }
5182 shapeBlock.PathShearX = (byte)(100 * topshear.x); 5182 shapeBlock.PathShearX = (byte)(100 * topshear.x);
5183 shapeBlock.PathShearY = (byte)(100 * topshear.y); 5183 shapeBlock.PathShearY = (byte)(100 * topshear.y);
5184 5184
5185 m_host.UpdateShape(shapeBlock); 5185 m_host.UpdateShape(shapeBlock);
5186 } 5186 }
5187 5187
5188 private void SetPrimitiveShapeParams(int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 dimple, byte fudge) 5188 private void SetPrimitiveShapeParams(int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 dimple, byte fudge)
5189 { 5189 {
5190 ObjectShapePacket.ObjectDataBlock shapeBlock; 5190 ObjectShapePacket.ObjectDataBlock shapeBlock;
5191 5191
5192 shapeBlock = SetPrimitiveShapeParams(holeshape, cut, hollow, twist); 5192 shapeBlock = SetPrimitiveShapeParams(holeshape, cut, hollow, twist);
5193 5193
5194 // profile/path swapped for a sphere 5194 // profile/path swapped for a sphere
5195 shapeBlock.PathBegin = shapeBlock.ProfileBegin; 5195 shapeBlock.PathBegin = shapeBlock.ProfileBegin;
5196 shapeBlock.PathEnd = shapeBlock.ProfileEnd; 5196 shapeBlock.PathEnd = shapeBlock.ProfileEnd;
5197 5197
5198 shapeBlock.ProfileCurve += fudge; 5198 shapeBlock.ProfileCurve += fudge;
5199 5199
5200 shapeBlock.PathScaleX = 100; 5200 shapeBlock.PathScaleX = 100;
5201 shapeBlock.PathScaleY = 100; 5201 shapeBlock.PathScaleY = 100;
5202 5202
5203 if (dimple.x < 0f) 5203 if (dimple.x < 0f)
5204 { 5204 {
5205 dimple.x = 0f; 5205 dimple.x = 0f;
@@ -5222,22 +5222,22 @@ namespace OpenSim.Region.ScriptEngine.Common
5222 } 5222 }
5223 shapeBlock.ProfileBegin = (ushort)(50000 * dimple.x); 5223 shapeBlock.ProfileBegin = (ushort)(50000 * dimple.x);
5224 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - dimple.y)); 5224 shapeBlock.ProfileEnd = (ushort)(50000 * (1 - dimple.y));
5225 5225
5226 m_host.UpdateShape(shapeBlock); 5226 m_host.UpdateShape(shapeBlock);
5227 } 5227 }
5228 5228
5229 private void SetPrimitiveShapeParams(int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 holesize, LSL_Types.Vector3 topshear, LSL_Types.Vector3 profilecut, LSL_Types.Vector3 taper_a, float revolutions, float radiusoffset, float skew, byte fudge) 5229 private void SetPrimitiveShapeParams(int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 holesize, LSL_Types.Vector3 topshear, LSL_Types.Vector3 profilecut, LSL_Types.Vector3 taper_a, float revolutions, float radiusoffset, float skew, byte fudge)
5230 { 5230 {
5231 ObjectShapePacket.ObjectDataBlock shapeBlock; 5231 ObjectShapePacket.ObjectDataBlock shapeBlock;
5232 5232
5233 shapeBlock = SetPrimitiveShapeParams(holeshape, cut, hollow, twist); 5233 shapeBlock = SetPrimitiveShapeParams(holeshape, cut, hollow, twist);
5234 5234
5235 shapeBlock.ProfileCurve += fudge; 5235 shapeBlock.ProfileCurve += fudge;
5236 5236
5237 // profile/path swapped for a torrus, tube, ring 5237 // profile/path swapped for a torrus, tube, ring
5238 shapeBlock.PathBegin = shapeBlock.ProfileBegin; 5238 shapeBlock.PathBegin = shapeBlock.ProfileBegin;
5239 shapeBlock.PathEnd = shapeBlock.ProfileEnd; 5239 shapeBlock.PathEnd = shapeBlock.ProfileEnd;
5240 5240
5241 if (holesize.x < 0.05f) 5241 if (holesize.x < 0.05f)
5242 { 5242 {
5243 holesize.x = 0.05f; 5243 holesize.x = 0.05f;
@@ -5342,15 +5342,15 @@ namespace OpenSim.Region.ScriptEngine.Common
5342 skew = 0.95f; 5342 skew = 0.95f;
5343 } 5343 }
5344 shapeBlock.PathSkew = (sbyte)(100 * skew); 5344 shapeBlock.PathSkew = (sbyte)(100 * skew);
5345 5345
5346 m_host.UpdateShape(shapeBlock); 5346 m_host.UpdateShape(shapeBlock);
5347 } 5347 }
5348 5348
5349 private void SetPrimitiveShapeParams(string map, int type) 5349 private void SetPrimitiveShapeParams(string map, int type)
5350 { 5350 {
5351 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); 5351 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
5352 LLUUID sculptId; 5352 LLUUID sculptId;
5353 5353
5354 if (!LLUUID.TryParse(map, out sculptId)) 5354 if (!LLUUID.TryParse(map, out sculptId))
5355 { 5355 {
5356 llSay(0, "Could not parse key " + map); 5356 llSay(0, "Could not parse key " + map);
@@ -5360,7 +5360,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5360 shapeBlock.ObjectLocalID = m_host.LocalId; 5360 shapeBlock.ObjectLocalID = m_host.LocalId;
5361 shapeBlock.PathScaleX = 100; 5361 shapeBlock.PathScaleX = 100;
5362 shapeBlock.PathScaleY = 150; 5362 shapeBlock.PathScaleY = 150;
5363 5363
5364 if (type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_CYLINDER && 5364 if (type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_CYLINDER &&
5365 type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_PLANE && 5365 type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_PLANE &&
5366 type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_SPHERE && 5366 type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_SPHERE &&
@@ -5369,7 +5369,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5369 // default 5369 // default
5370 type = (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_SPHERE; 5370 type = (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_SPHERE;
5371 } 5371 }
5372 5372
5373 // retain pathcurve 5373 // retain pathcurve
5374 shapeBlock.PathCurve = m_host.Shape.PathCurve; 5374 shapeBlock.PathCurve = m_host.Shape.PathCurve;
5375 5375
@@ -5422,7 +5422,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5422 5422
5423 v=new LSL_Types.Vector3(rules.Data[idx++].ToString()); 5423 v=new LSL_Types.Vector3(rules.Data[idx++].ToString());
5424 SetScale(part, v); 5424 SetScale(part, v);
5425 5425
5426 break; 5426 break;
5427 case (int)BuiltIn_Commands_BaseClass.PRIM_ROTATION: 5427 case (int)BuiltIn_Commands_BaseClass.PRIM_ROTATION:
5428 if (remain < 1) 5428 if (remain < 1)
@@ -5432,13 +5432,13 @@ namespace OpenSim.Region.ScriptEngine.Common
5432 SetRot(part, q); 5432 SetRot(part, q);
5433 5433
5434 break; 5434 break;
5435 5435
5436 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE: 5436 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE:
5437 if (remain < 3) 5437 if (remain < 3)
5438 return; 5438 return;
5439 5439
5440 code = Convert.ToInt32(rules.Data[idx++]); 5440 code = Convert.ToInt32(rules.Data[idx++]);
5441 5441
5442 remain = rules.Length - idx; 5442 remain = rules.Length - idx;
5443 float hollow; 5443 float hollow;
5444 LSL_Types.Vector3 twist; 5444 LSL_Types.Vector3 twist;
@@ -5449,9 +5449,9 @@ namespace OpenSim.Region.ScriptEngine.Common
5449 float skew; 5449 float skew;
5450 LSL_Types.Vector3 holesize; 5450 LSL_Types.Vector3 holesize;
5451 LSL_Types.Vector3 profilecut; 5451 LSL_Types.Vector3 profilecut;
5452 5452
5453 switch (code) 5453 switch (code)
5454 { 5454 {
5455 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX: 5455 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX:
5456 if (remain < 6) 5456 if (remain < 6)
5457 return; 5457 return;
@@ -5465,7 +5465,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5465 m_host.Shape.PathCurve = (byte) Extrusion.Straight; 5465 m_host.Shape.PathCurve = (byte) Extrusion.Straight;
5466 SetPrimitiveShapeParams(face, v, hollow, twist, taper_b, topshear, 1); 5466 SetPrimitiveShapeParams(face, v, hollow, twist, taper_b, topshear, 1);
5467 break; 5467 break;
5468 5468
5469 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER: 5469 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER:
5470 if (remain < 6) 5470 if (remain < 6)
5471 return; 5471 return;
@@ -5480,12 +5480,12 @@ namespace OpenSim.Region.ScriptEngine.Common
5480 m_host.Shape.PathCurve = (byte) Extrusion.Straight; 5480 m_host.Shape.PathCurve = (byte) Extrusion.Straight;
5481 SetPrimitiveShapeParams(face, v, hollow, twist, taper_b, topshear, 0); 5481 SetPrimitiveShapeParams(face, v, hollow, twist, taper_b, topshear, 0);
5482 break; 5482 break;
5483 5483
5484 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM: 5484 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM:
5485 if (remain < 6) 5485 if (remain < 6)
5486 return; 5486 return;
5487 5487
5488 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 5488 face = Convert.ToInt32(rules.Data[idx++]); // holeshape
5489 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut 5489 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut
5490 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 5490 hollow = (float)Convert.ToDouble(rules.Data[idx++]);
5491 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 5491 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
@@ -5507,12 +5507,12 @@ namespace OpenSim.Region.ScriptEngine.Common
5507 m_host.Shape.PathCurve = (byte) Extrusion.Curve1; 5507 m_host.Shape.PathCurve = (byte) Extrusion.Curve1;
5508 SetPrimitiveShapeParams(face, v, hollow, twist, taper_b, 5); 5508 SetPrimitiveShapeParams(face, v, hollow, twist, taper_b, 5);
5509 break; 5509 break;
5510 5510
5511 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_TORUS: 5511 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_TORUS:
5512 if (remain < 11) 5512 if (remain < 11)
5513 return; 5513 return;
5514 5514
5515 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 5515 face = Convert.ToInt32(rules.Data[idx++]); // holeshape
5516 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut 5516 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut
5517 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 5517 hollow = (float)Convert.ToDouble(rules.Data[idx++]);
5518 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 5518 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
@@ -5526,12 +5526,12 @@ namespace OpenSim.Region.ScriptEngine.Common
5526 m_host.Shape.PathCurve = (byte) Extrusion.Curve1; 5526 m_host.Shape.PathCurve = (byte) Extrusion.Curve1;
5527 SetPrimitiveShapeParams(face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 0); 5527 SetPrimitiveShapeParams(face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 0);
5528 break; 5528 break;
5529 5529
5530 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_TUBE: 5530 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_TUBE:
5531 if (remain < 11) 5531 if (remain < 11)
5532 return; 5532 return;
5533 5533
5534 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 5534 face = Convert.ToInt32(rules.Data[idx++]); // holeshape
5535 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut 5535 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut
5536 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 5536 hollow = (float)Convert.ToDouble(rules.Data[idx++]);
5537 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 5537 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
@@ -5545,12 +5545,12 @@ namespace OpenSim.Region.ScriptEngine.Common
5545 m_host.Shape.PathCurve = (byte) Extrusion.Curve1; 5545 m_host.Shape.PathCurve = (byte) Extrusion.Curve1;
5546 SetPrimitiveShapeParams(face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 1); 5546 SetPrimitiveShapeParams(face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 1);
5547 break; 5547 break;
5548 5548
5549 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_RING: 5549 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_RING:
5550 if (remain < 11) 5550 if (remain < 11)
5551 return; 5551 return;
5552 5552
5553 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 5553 face = Convert.ToInt32(rules.Data[idx++]); // holeshape
5554 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut 5554 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut
5555 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 5555 hollow = (float)Convert.ToDouble(rules.Data[idx++]);
5556 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 5556 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString());
@@ -5564,7 +5564,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5564 m_host.Shape.PathCurve = (byte) Extrusion.Curve1; 5564 m_host.Shape.PathCurve = (byte) Extrusion.Curve1;
5565 SetPrimitiveShapeParams(face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 3); 5565 SetPrimitiveShapeParams(face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 3);
5566 break; 5566 break;
5567 5567
5568 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_SCULPT: 5568 case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_SCULPT:
5569 if (remain < 2) 5569 if (remain < 2)
5570 return; 5570 return;
@@ -5575,7 +5575,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5575 SetPrimitiveShapeParams(map, face); 5575 SetPrimitiveShapeParams(map, face);
5576 break; 5576 break;
5577 } 5577 }
5578 5578
5579 break; 5579 break;
5580 5580
5581 case (int)BuiltIn_Commands_BaseClass.PRIM_TEXTURE: 5581 case (int)BuiltIn_Commands_BaseClass.PRIM_TEXTURE:
@@ -5630,7 +5630,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5630 float intensity = (float)Convert.ToDouble(rules.Data[idx++]); 5630 float intensity = (float)Convert.ToDouble(rules.Data[idx++]);
5631 float radius = (float)Convert.ToDouble(rules.Data[idx++]); 5631 float radius = (float)Convert.ToDouble(rules.Data[idx++]);
5632 float falloff = (float)Convert.ToDouble(rules.Data[idx++]); 5632 float falloff = (float)Convert.ToDouble(rules.Data[idx++]);
5633 5633
5634 SetPointLight(part, (light == 1), lightcolor, intensity, radius, falloff); 5634 SetPointLight(part, (light == 1), lightcolor, intensity, radius, falloff);
5635 5635
5636 break; 5636 break;
@@ -5701,7 +5701,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5701 public LSL_Types.list llGetAnimationList( string id ) 5701 public LSL_Types.list llGetAnimationList( string id )
5702 { 5702 {
5703 m_host.AddScriptLPS(1); 5703 m_host.AddScriptLPS(1);
5704 5704
5705 LSL_Types.list l = new LSL_Types.list(); 5705 LSL_Types.list l = new LSL_Types.list();
5706 ScenePresence av = World.GetScenePresence(id); 5706 ScenePresence av = World.GetScenePresence(id);
5707 if (av == null) 5707 if (av == null)
@@ -6560,7 +6560,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6560 IConfigSource config = new IniConfigSource(Application.iniFilePath); 6560 IConfigSource config = new IniConfigSource(Application.iniFilePath);
6561 if (config.Configs["LL-Functions"] == null) 6561 if (config.Configs["LL-Functions"] == null)
6562 config.AddConfig("LL-Functions"); 6562 config.AddConfig("LL-Functions");
6563 6563
6564 if (config.Configs["LL-Functions"].GetBoolean("AllowGodFunctions", false)) 6564 if (config.Configs["LL-Functions"].GetBoolean("AllowGodFunctions", false))
6565 { 6565 {
6566 if (World.ExternalChecks.ExternalChecksCanRunConsoleCommand(m_host.OwnerID)) 6566 if (World.ExternalChecks.ExternalChecksCanRunConsoleCommand(m_host.OwnerID))
@@ -6829,7 +6829,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6829 //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) 6829 //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later)
6830 m_host.AddScriptLPS(1); 6830 m_host.AddScriptLPS(1);
6831 for (int i = 0; i < commandList.Data.Length; i++) 6831 for (int i = 0; i < commandList.Data.Length; i++)
6832 { 6832 {
6833 switch ((ParcelMediaCommandEnum)commandList.Data[i]) 6833 switch ((ParcelMediaCommandEnum)commandList.Data[i])
6834 { 6834 {
6835 case ParcelMediaCommandEnum.Play: 6835 case ParcelMediaCommandEnum.Play:
@@ -6839,7 +6839,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6839 if (!agent.IsChildAgent) 6839 if (!agent.IsChildAgent)
6840 { 6840 {
6841 agent.ControllingClient.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0); 6841 agent.ControllingClient.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0);
6842 } 6842 }
6843 } 6843 }
6844 break; 6844 break;
6845 case ParcelMediaCommandEnum.Stop: 6845 case ParcelMediaCommandEnum.Stop:
@@ -6870,7 +6870,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6870 { 6870 {
6871 //Set the new media URL only if the user is the owner of the land 6871 //Set the new media URL only if the user is the owner of the land
6872 osSetParcelMediaURL(commandList.Data[i + 1].ToString()); 6872 osSetParcelMediaURL(commandList.Data[i + 1].ToString());
6873 6873
6874 List<ScenePresence> scenePresenceList = World.GetScenePresences(); 6874 List<ScenePresence> scenePresenceList = World.GetScenePresences();
6875 LandData landData = World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 6875 LandData landData = World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
6876 //Send an update of the mediaURL to all the clients that are in the parcel 6876 //Send an update of the mediaURL to all the clients that are in the parcel
@@ -6881,8 +6881,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6881 //Send parcel media update to the client 6881 //Send parcel media update to the client
6882 agent.ControllingClient.SendParcelMediaUpdate(landData.MediaURL, landData.MediaID, landData.MediaAutoScale, "", landData.Description, 0, 0, 1); 6882 agent.ControllingClient.SendParcelMediaUpdate(landData.MediaURL, landData.MediaID, landData.MediaAutoScale, "", landData.Description, 0, 0, 1);
6883 } 6883 }
6884 } 6884 }
6885 6885
6886 } 6886 }
6887 i++; 6887 i++;
6888 } 6888 }
@@ -6892,7 +6892,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6892 NotImplemented("llParcelMediaCommandList parameter do not supported yet: " + Enum.Parse(mediaCommandEnum.GetType(), commandList.Data[i].ToString()).ToString()); 6892 NotImplemented("llParcelMediaCommandList parameter do not supported yet: " + Enum.Parse(mediaCommandEnum.GetType(), commandList.Data[i].ToString()).ToString());
6893 break; 6893 break;
6894 }//end switch 6894 }//end switch
6895 6895
6896 } 6896 }
6897 6897
6898 6898
@@ -6935,7 +6935,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6935 } 6935 }
6936 } 6936 }
6937 return list; 6937 return list;
6938 6938
6939 } 6939 }
6940 6940
6941 public LSL_Types.LSLInteger llModPow(int a, int b, int c) 6941 public LSL_Types.LSLInteger llModPow(int a, int b, int c)
@@ -6979,7 +6979,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6979 { 6979 {
6980 m_host.AddScriptLPS(1); 6980 m_host.AddScriptLPS(1);
6981 LLUUID invItemID=InventorySelf(); 6981 LLUUID invItemID=InventorySelf();
6982 if (invItemID == LLUUID.Zero) 6982 if (invItemID == LLUUID.Zero)
6983 return new LSL_Types.Vector3(); 6983 return new LSL_Types.Vector3();
6984 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 6984 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero)
6985 return new LSL_Types.Vector3(); 6985 return new LSL_Types.Vector3();
@@ -6989,7 +6989,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6989 return new LSL_Types.Vector3(); 6989 return new LSL_Types.Vector3();
6990 } 6990 }
6991 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 6991 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
6992 if (presence != null) 6992 if (presence != null)
6993 { 6993 {
6994 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z); 6994 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z);
6995 return pos; 6995 return pos;
@@ -7111,8 +7111,8 @@ namespace OpenSim.Region.ScriptEngine.Common
7111 public void llSetCameraParams(LSL_Types.list rules) 7111 public void llSetCameraParams(LSL_Types.list rules)
7112 { 7112 {
7113 m_host.AddScriptLPS(1); 7113 m_host.AddScriptLPS(1);
7114 7114
7115 // our key in the object we are in 7115 // our key in the object we are in
7116 LLUUID invItemID=InventorySelf(); 7116 LLUUID invItemID=InventorySelf();
7117 if (invItemID == LLUUID.Zero) return; 7117 if (invItemID == LLUUID.Zero) return;
7118 7118
@@ -7126,10 +7126,10 @@ namespace OpenSim.Region.ScriptEngine.Common
7126 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; 7126 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return;
7127 7127
7128 ScenePresence presence = World.GetScenePresence(agentID); 7128 ScenePresence presence = World.GetScenePresence(agentID);
7129 7129
7130 // we are not interested in child-agents 7130 // we are not interested in child-agents
7131 if (presence.IsChildAgent) return; 7131 if (presence.IsChildAgent) return;
7132 7132
7133 SortedDictionary<int, float> parameters = new SortedDictionary<int, float>(); 7133 SortedDictionary<int, float> parameters = new SortedDictionary<int, float>();
7134 object[] data = rules.Data; 7134 object[] data = rules.Data;
7135 for (int i = 0; i < data.Length; ++i) { 7135 for (int i = 0; i < data.Length; ++i) {
@@ -7142,8 +7142,8 @@ namespace OpenSim.Region.ScriptEngine.Common
7142 case BuiltIn_Commands_BaseClass.CAMERA_FOCUS_OFFSET: 7142 case BuiltIn_Commands_BaseClass.CAMERA_FOCUS_OFFSET:
7143 case BuiltIn_Commands_BaseClass.CAMERA_POSITION: 7143 case BuiltIn_Commands_BaseClass.CAMERA_POSITION:
7144 LSL_Types.Vector3 v = (LSL_Types.Vector3)data[i]; 7144 LSL_Types.Vector3 v = (LSL_Types.Vector3)data[i];
7145 parameters.Add(type + 1, (float)v.x); 7145 parameters.Add(type + 1, (float)v.x);
7146 parameters.Add(type + 2, (float)v.y); 7146 parameters.Add(type + 2, (float)v.y);
7147 parameters.Add(type + 3, (float)v.z); 7147 parameters.Add(type + 3, (float)v.z);
7148 break; 7148 break;
7149 default: 7149 default:
@@ -7163,7 +7163,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7163 { 7163 {
7164 m_host.AddScriptLPS(1); 7164 m_host.AddScriptLPS(1);
7165 7165
7166 // our key in the object we are in 7166 // our key in the object we are in
7167 LLUUID invItemID=InventorySelf(); 7167 LLUUID invItemID=InventorySelf();
7168 if (invItemID == LLUUID.Zero) return; 7168 if (invItemID == LLUUID.Zero) return;
7169 7169
@@ -7177,10 +7177,10 @@ namespace OpenSim.Region.ScriptEngine.Common
7177 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; 7177 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return;
7178 7178
7179 ScenePresence presence = World.GetScenePresence(agentID); 7179 ScenePresence presence = World.GetScenePresence(agentID);
7180 7180
7181 // we are not interested in child-agents 7181 // we are not interested in child-agents
7182 if (presence.IsChildAgent) return; 7182 if (presence.IsChildAgent) return;
7183 7183
7184 presence.ControllingClient.SendClearFollowCamProperties(objectID); 7184 presence.ControllingClient.SendClearFollowCamProperties(objectID);
7185 } 7185 }
7186 7186
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index e98dec6..3b317ac 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -703,7 +703,7 @@ namespace OpenSim.Region.ScriptEngine.Common
703 // Otherwise, if we have strings, compare them alphabetically. 703 // Otherwise, if we have strings, compare them alphabetically.
704 string str1 = new string(space1); 704 string str1 = new string(space1);
705 string str2 = new string(space2); 705 string str2 = new string(space2);
706 706
707 int result; 707 int result;
708 708
709 if (char.IsDigit(space1[0]) && char.IsDigit(space2[0])) 709 if (char.IsDigit(space1[0]) && char.IsDigit(space2[0]))
@@ -1427,22 +1427,22 @@ namespace OpenSim.Region.ScriptEngine.Common
1427 bool ret = i1.value != i2.value; 1427 bool ret = i1.value != i2.value;
1428 return ret; 1428 return ret;
1429 } 1429 }
1430 1430
1431 static public LSLInteger operator +(LSLInteger i1, int i2) 1431 static public LSLInteger operator +(LSLInteger i1, int i2)
1432 { 1432 {
1433 return new LSLInteger(i1.value + i2); 1433 return new LSLInteger(i1.value + i2);
1434 } 1434 }
1435 1435
1436 static public LSLInteger operator -(LSLInteger i1, int i2) 1436 static public LSLInteger operator -(LSLInteger i1, int i2)
1437 { 1437 {
1438 return new LSLInteger(i1.value - i2); 1438 return new LSLInteger(i1.value - i2);
1439 } 1439 }
1440 1440
1441 static public LSLInteger operator *(LSLInteger i1, int i2) 1441 static public LSLInteger operator *(LSLInteger i1, int i2)
1442 { 1442 {
1443 return new LSLInteger(i1.value * i2); 1443 return new LSLInteger(i1.value * i2);
1444 } 1444 }
1445 1445
1446 static public LSLInteger operator /(LSLInteger i1, int i2) 1446 static public LSLInteger operator /(LSLInteger i1, int i2)
1447 { 1447 {
1448 return new LSLInteger(i1.value / i2); 1448 return new LSLInteger(i1.value / i2);
@@ -1452,22 +1452,22 @@ namespace OpenSim.Region.ScriptEngine.Common
1452 { 1452 {
1453 return new LSLFloat((double)i1.value + f); 1453 return new LSLFloat((double)i1.value + f);
1454 } 1454 }
1455 1455
1456 static public LSLFloat operator -(LSLInteger i1, double f) 1456 static public LSLFloat operator -(LSLInteger i1, double f)
1457 { 1457 {
1458 return new LSLFloat((double)i1.value - f); 1458 return new LSLFloat((double)i1.value - f);
1459 } 1459 }
1460 1460
1461 static public LSLFloat operator *(LSLInteger i1, double f) 1461 static public LSLFloat operator *(LSLInteger i1, double f)
1462 { 1462 {
1463 return new LSLFloat((double)i1.value * f); 1463 return new LSLFloat((double)i1.value * f);
1464 } 1464 }
1465 1465
1466 static public LSLFloat operator /(LSLInteger i1, double f) 1466 static public LSLFloat operator /(LSLInteger i1, double f)
1467 { 1467 {
1468 return new LSLFloat((double)i1.value / f); 1468 return new LSLFloat((double)i1.value / f);
1469 } 1469 }
1470 1470
1471 static public LSLInteger operator -(LSLInteger i) 1471 static public LSLInteger operator -(LSLInteger i)
1472 { 1472 {
1473 return new LSLInteger(-i.value); 1473 return new LSLInteger(-i.value);
@@ -1623,17 +1623,17 @@ namespace OpenSim.Region.ScriptEngine.Common
1623 f.value--; 1623 f.value--;
1624 return f; 1624 return f;
1625 } 1625 }
1626 1626
1627 static public LSLFloat operator +(LSLFloat f, int i) 1627 static public LSLFloat operator +(LSLFloat f, int i)
1628 { 1628 {
1629 return new LSLFloat(f.value + (double)i); 1629 return new LSLFloat(f.value + (double)i);
1630 } 1630 }
1631 1631
1632 static public LSLFloat operator -(LSLFloat f, int i) 1632 static public LSLFloat operator -(LSLFloat f, int i)
1633 { 1633 {
1634 return new LSLFloat(f.value - (double)i); 1634 return new LSLFloat(f.value - (double)i);
1635 } 1635 }
1636 1636
1637 static public LSLFloat operator *(LSLFloat f, int i) 1637 static public LSLFloat operator *(LSLFloat f, int i)
1638 { 1638 {
1639 return new LSLFloat(f.value * (double)i); 1639 return new LSLFloat(f.value * (double)i);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
index 5f86c9c..77cc7ea 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
88 { 88 {
89 if (!DataserverRequests.ContainsKey(identifier)) 89 if (!DataserverRequests.ContainsKey(identifier))
90 return; 90 return;
91 91
92 ds=DataserverRequests[identifier]; 92 ds=DataserverRequests[identifier];
93 DataserverRequests.Remove(identifier); 93 DataserverRequests.Remove(identifier);
94 } 94 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
index 79c1dde..5c57874 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
126 /// Queue containing events waiting to be executed 126 /// Queue containing events waiting to be executed
127 /// </summary> 127 /// </summary>
128 public Queue<QueueItemStruct> eventQueue = new Queue<QueueItemStruct>(); 128 public Queue<QueueItemStruct> eventQueue = new Queue<QueueItemStruct>();
129 129
130 #region " Queue structures " 130 #region " Queue structures "
131 /// <summary> 131 /// <summary>
132 /// Queue item structure 132 /// Queue item structure
@@ -193,7 +193,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
193 } 193 }
194 194
195 #endregion 195 #endregion
196 196
197 #region " Shutdown all threads " 197 #region " Shutdown all threads "
198 ~EventQueueManager() 198 ~EventQueueManager()
199 { 199 {
@@ -408,10 +408,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
408 408
409 // Set flag if script should be removed or not 409 // Set flag if script should be removed or not
410 EventQueueThread.KillCurrentScript = KillScriptOnMaxFunctionExecutionTime; 410 EventQueueThread.KillCurrentScript = KillScriptOnMaxFunctionExecutionTime;
411 411
412 // Abort this thread 412 // Abort this thread
413 AbortThreadClass(EventQueueThread); 413 AbortThreadClass(EventQueueThread);
414 414
415 // We do not need to start another, MaintenenceThread will do that for us 415 // We do not need to start another, MaintenenceThread will do that for us
416 //StartNewThreadClass(); 416 //StartNewThreadClass();
417 } 417 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
index 255ab99..4376e00 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
44 public class EventQueueThreadClass : iScriptEngineFunctionModule 44 public class EventQueueThreadClass : iScriptEngineFunctionModule
45 { 45 {
46 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 /// <summary> 48 /// <summary>
49 /// How many ms to sleep if queue is empty 49 /// How many ms to sleep if queue is empty
50 /// </summary> 50 /// </summary>
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
index f04ac01..9a465f6 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.Common
73 void remote_data(uint localID, LLUUID itemID); 73 void remote_data(uint localID, LLUUID itemID);
74 void http_response(uint localID, LLUUID itemID); 74 void http_response(uint localID, LLUUID itemID);
75 } 75 }
76 76
77 public interface ServerRemotingObject 77 public interface ServerRemotingObject
78 { 78 {
79 RemoteEvents Events(); 79 RemoteEvents Events();