From 6ef9d4da901a346c232458317cca6268da888e2e Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 18 Aug 2008 00:39:10 +0000 Subject: Formatting cleanup. --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 204 ++++++++++----------- OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 24 +-- .../AsyncCommandPlugins/Dataserver.cs | 2 +- .../Common/ScriptEngineBase/EventQueueManager.cs | 8 +- .../ScriptEngineBase/EventQueueThreadClass.cs | 2 +- .../ScriptEngine/Common/ScriptServerInterfaces.cs | 2 +- 6 files changed, 121 insertions(+), 121 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common') 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 a vector pointing along the X axis, first rotating it 3 degrees around the global Z axis, then rotating the resulting vector 2 degrees around the global Y axis, and finally rotating that 1 degree around the global X axis. */ - + /* How we arrived at this llEuler2Rot - * + * * Experiment in SL to determine conventions: * llEuler2Rot()=<1,0,0,0> * llEuler2Rot(<0,PI,0>)=<0,1,0,0> * llEuler2Rot(<0,0,PI>)=<0,0,1,0> - * + * * Important facts about Quaternions * - multiplication is non-commutative (a*b != b*a) * - http://en.wikipedia.org/wiki/Quaternion#Basis_multiplication - * + * * Above SL experiment gives (c1,c2,c3,s1,s2,s3 as defined in our llEuler2Rot): * Qx = c1+i*s1 * Qy = c2+j*s2; * Qz = c3+k*s3; - * + * * Rotations applied in order (from above) Z, Y, X * Q = (Qz * Qy) * Qx * ((c1+i*s1)*(c2+j*s2))*(c3+k*s3) @@ -389,23 +389,23 @@ namespace OpenSim.Region.ScriptEngine.Common * y=j*(c1*s2*c3-s1*c2*s3) * z=k*(s1*s2*c3+c1*c2*s3) * s= c1*c2*c3-s1*s2*s3 - * + * * This implementation agrees with the functions found here: * http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions * And with the results in SL. - * + * * It's also possible to calculate llEuler2Rot by direct multiplication of * the Qz, Qy, and Qx vectors (as above - and done in the "accurate" function - * from the wiki). - * Apparently in some cases this is better from a numerical precision perspective? - */ + * from the wiki). + * Apparently in some cases this is better from a numerical precision perspective? + */ public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v) { m_host.AddScriptLPS(1); double x,y,z,s; - + double c1 = Math.Cos(v.x/2.0); double c2 = Math.Cos(v.y/2.0); double c3 = Math.Cos(v.z/2.0); @@ -417,7 +417,7 @@ namespace OpenSim.Region.ScriptEngine.Common y = c1*s2*c3-s1*c2*s3; z = s1*s2*c3+c1*c2*s3; s = c1*c2*c3-s1*s2*s3; - + return new LSL_Types.Quaternion(x, y, z, s); } @@ -427,7 +427,7 @@ namespace OpenSim.Region.ScriptEngine.Common double x,y,z,s; int f=0; // Important Note: q1= is equal to q2=<-x,-y,-z,-s> - // Computing quaternion x,y,z,s values + // Computing quaternion x,y,z,s values x = ((fwd.x - left.y - up.z + 1) / 4); x *= x; x = Math.Sqrt(Math.Sqrt(x)); @@ -441,7 +441,7 @@ namespace OpenSim.Region.ScriptEngine.Common s *= s; s = Math.Sqrt(Math.Sqrt(s)); - // Set f for signs detection + // Set f for signs detection if (fwd.y+left.x >= 0){f+=1;} if (fwd.z+up.x >= 0){f+=2;} if (left.z-up.y >= 0){f+=4;} @@ -510,7 +510,7 @@ namespace OpenSim.Region.ScriptEngine.Common x = 2 * (r.x * r.y - r.z * r.s); y = -r.x * r.x + r.y * r.y - r.z * r.z + r.s * r.s; z = 2 * (r.x * r.s + r.y * r.z); - return (new LSL_Types.Vector3(x, y, z)); + return (new LSL_Types.Vector3(x, y, z)); } public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) @@ -536,7 +536,7 @@ namespace OpenSim.Region.ScriptEngine.Common z = -r.x * r.x - r.y * r.y + r.z * r.z + r.s * r.s; return (new LSL_Types.Vector3(x, y, z)); } - + public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 a, LSL_Types.Vector3 b) { //A and B should both be normalized @@ -1215,7 +1215,7 @@ namespace OpenSim.Region.ScriptEngine.Common /// /// Set flexi parameters of a part. - /// + /// /// FIXME: Much of this code should probably be within the part itself. /// /// @@ -1226,7 +1226,7 @@ namespace OpenSim.Region.ScriptEngine.Common /// /// /// - private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, + private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, float wind, float tension, LSL_Types.Vector3 Force) { if (part == null) @@ -1239,7 +1239,7 @@ namespace OpenSim.Region.ScriptEngine.Common { needs_fakedelete = true; } - part.Shape.FlexiEntry = true; // this setting flexi true isn't working, but the below parameters do + part.Shape.FlexiEntry = true; // this setting flexi true isn't working, but the below parameters do // work once the prim is already flexi part.Shape.FlexiSoftness = softness; part.Shape.FlexiGravity = gravity; @@ -1265,7 +1265,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (needs_fakedelete) { if (part.ParentGroup != null) - { + { part.ParentGroup.FakeDeleteGroup(); } } @@ -1276,7 +1276,7 @@ namespace OpenSim.Region.ScriptEngine.Common /// /// Set a light point on a part - /// + /// /// FIXME: Much of this code should probably be in SceneObjectGroup /// /// @@ -1781,7 +1781,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.SoundGain = volume; m_host.SoundFlags = 1; // looping m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable? - + m_host.ScheduleFullUpdate(); m_host.SendFullUpdateToAllClients(); } @@ -2908,13 +2908,13 @@ namespace OpenSim.Region.ScriptEngine.Common bool found = false; LLUUID destId = LLUUID.Zero; LLUUID objId = LLUUID.Zero; - + if (!LLUUID.TryParse(destination, out destId)) { llSay(0, "Could not parse key " + destination); return; } - + // move the first object found with this inventory name foreach (KeyValuePair inv in m_host.TaskInventory) { @@ -2931,7 +2931,7 @@ namespace OpenSim.Region.ScriptEngine.Common llSay(0, String.Format("Could not find object '{0}'", inventory)); throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory)); } - + // check if destination is an avatar if (World.GetScenePresence(destId) != null) { @@ -2993,7 +2993,7 @@ namespace OpenSim.Region.ScriptEngine.Common { LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest( m_localID, m_itemID, item.AssetID.ToString()); - + LLVector3 region = new LLVector3( World.RegionInfo.RegionLocX * Constants.RegionSize, World.RegionInfo.RegionLocY * Constants.RegionSize, @@ -4155,13 +4155,13 @@ namespace OpenSim.Region.ScriptEngine.Common if (LLUUID.TryParse(id,out key)) { ScenePresence presence = World.GetScenePresence(key); - + if (presence != null) { return presence.ControllingClient.Name; //return presence.Name; } - + if (World.GetSceneObjectPart(key) != null) { return World.GetSceneObjectPart(key).Name; @@ -4516,7 +4516,7 @@ namespace OpenSim.Region.ScriptEngine.Common private Primitive.ParticleSystem getNewParticleSystemWithSLDefaultValues() { Primitive.ParticleSystem ps = new Primitive.ParticleSystem(); - + // TODO find out about the other defaults and add them here ps.PartStartColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); ps.PartEndColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); @@ -4530,7 +4530,7 @@ namespace OpenSim.Region.ScriptEngine.Common ps.PartMaxAge = 10.0f; return ps; } - + public void llParticleSystem(LSL_Types.list rules) { m_host.AddScriptLPS(1); @@ -4725,7 +4725,7 @@ namespace OpenSim.Region.ScriptEngine.Common itemList.Add(itemID); } } - + if (itemList.Count == 0) return; @@ -4973,7 +4973,7 @@ namespace OpenSim.Region.ScriptEngine.Common public void llSetRemoteScriptAccessPin(int pin) { m_host.AddScriptLPS(1); - + m_host.ScriptAccessPin = pin; } @@ -4983,19 +4983,19 @@ namespace OpenSim.Region.ScriptEngine.Common bool found = false; LLUUID destId = LLUUID.Zero; LLUUID srcId = LLUUID.Zero; - + if (!LLUUID.TryParse(target, out destId)) { llSay(0, "Could not parse key " + target); return; } - + // target must be a different prim than the one containing the script if (m_host.UUID == destId) { return; } - + // copy the first script found with this inventory name foreach (KeyValuePair inv in m_host.TaskInventory) { @@ -5010,13 +5010,13 @@ namespace OpenSim.Region.ScriptEngine.Common } } } - + if (!found) { llSay(0, "Could not find script " + name); return; } - + // the rest of the permission checks are done in RezScript, so check the pin there as well World.RezScript(srcId, m_host, destId, pin, running, start_param); // 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 m_host.AddScriptLPS(1); return Util.Md5Hash(src + ":" + nonce.ToString()); } - + private ObjectShapePacket.ObjectDataBlock SetPrimitiveShapeParams(int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist) { ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); - + if (holeshape != (int)BuiltIn_Commands_BaseClass.PRIM_HOLE_DEFAULT && holeshape != (int)BuiltIn_Commands_BaseClass.PRIM_HOLE_CIRCLE && holeshape != (int)BuiltIn_Commands_BaseClass.PRIM_HOLE_SQUARE && @@ -5128,23 +5128,23 @@ namespace OpenSim.Region.ScriptEngine.Common } shapeBlock.PathTwistBegin = (sbyte)(200 * twist.x); shapeBlock.PathTwist = (sbyte)(200 * twist.y); - + shapeBlock.ObjectLocalID = m_host.LocalId; - + // retain pathcurve - shapeBlock.PathCurve = m_host.Shape.PathCurve; - + shapeBlock.PathCurve = m_host.Shape.PathCurve; + return shapeBlock; } - + 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) { ObjectShapePacket.ObjectDataBlock shapeBlock; - + shapeBlock = SetPrimitiveShapeParams(holeshape, cut, hollow, twist); - + shapeBlock.ProfileCurve += fudge; - + if (taper_b.x < 0f) { taper_b.x = 0f; @@ -5181,25 +5181,25 @@ namespace OpenSim.Region.ScriptEngine.Common } shapeBlock.PathShearX = (byte)(100 * topshear.x); shapeBlock.PathShearY = (byte)(100 * topshear.y); - + m_host.UpdateShape(shapeBlock); } - + private void SetPrimitiveShapeParams(int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 dimple, byte fudge) { ObjectShapePacket.ObjectDataBlock shapeBlock; - + shapeBlock = SetPrimitiveShapeParams(holeshape, cut, hollow, twist); - + // profile/path swapped for a sphere shapeBlock.PathBegin = shapeBlock.ProfileBegin; shapeBlock.PathEnd = shapeBlock.ProfileEnd; - + shapeBlock.ProfileCurve += fudge; - + shapeBlock.PathScaleX = 100; shapeBlock.PathScaleY = 100; - + if (dimple.x < 0f) { dimple.x = 0f; @@ -5222,22 +5222,22 @@ namespace OpenSim.Region.ScriptEngine.Common } shapeBlock.ProfileBegin = (ushort)(50000 * dimple.x); shapeBlock.ProfileEnd = (ushort)(50000 * (1 - dimple.y)); - + m_host.UpdateShape(shapeBlock); } - + 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) { ObjectShapePacket.ObjectDataBlock shapeBlock; - + shapeBlock = SetPrimitiveShapeParams(holeshape, cut, hollow, twist); - + shapeBlock.ProfileCurve += fudge; // profile/path swapped for a torrus, tube, ring shapeBlock.PathBegin = shapeBlock.ProfileBegin; shapeBlock.PathEnd = shapeBlock.ProfileEnd; - + if (holesize.x < 0.05f) { holesize.x = 0.05f; @@ -5342,15 +5342,15 @@ namespace OpenSim.Region.ScriptEngine.Common skew = 0.95f; } shapeBlock.PathSkew = (sbyte)(100 * skew); - + m_host.UpdateShape(shapeBlock); } - + private void SetPrimitiveShapeParams(string map, int type) { ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); LLUUID sculptId; - + if (!LLUUID.TryParse(map, out sculptId)) { llSay(0, "Could not parse key " + map); @@ -5360,7 +5360,7 @@ namespace OpenSim.Region.ScriptEngine.Common shapeBlock.ObjectLocalID = m_host.LocalId; shapeBlock.PathScaleX = 100; shapeBlock.PathScaleY = 150; - + if (type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_CYLINDER && type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_PLANE && type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_SPHERE && @@ -5369,7 +5369,7 @@ namespace OpenSim.Region.ScriptEngine.Common // default type = (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_SPHERE; } - + // retain pathcurve shapeBlock.PathCurve = m_host.Shape.PathCurve; @@ -5422,7 +5422,7 @@ namespace OpenSim.Region.ScriptEngine.Common v=new LSL_Types.Vector3(rules.Data[idx++].ToString()); SetScale(part, v); - + break; case (int)BuiltIn_Commands_BaseClass.PRIM_ROTATION: if (remain < 1) @@ -5432,13 +5432,13 @@ namespace OpenSim.Region.ScriptEngine.Common SetRot(part, q); break; - + case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE: if (remain < 3) return; - + code = Convert.ToInt32(rules.Data[idx++]); - + remain = rules.Length - idx; float hollow; LSL_Types.Vector3 twist; @@ -5449,9 +5449,9 @@ namespace OpenSim.Region.ScriptEngine.Common float skew; LSL_Types.Vector3 holesize; LSL_Types.Vector3 profilecut; - + switch (code) - { + { case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX: if (remain < 6) return; @@ -5465,7 +5465,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.Shape.PathCurve = (byte) Extrusion.Straight; SetPrimitiveShapeParams(face, v, hollow, twist, taper_b, topshear, 1); break; - + case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER: if (remain < 6) return; @@ -5480,12 +5480,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.Shape.PathCurve = (byte) Extrusion.Straight; SetPrimitiveShapeParams(face, v, hollow, twist, taper_b, topshear, 0); break; - + case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM: if (remain < 6) return; - face = Convert.ToInt32(rules.Data[idx++]); // holeshape + face = Convert.ToInt32(rules.Data[idx++]); // holeshape v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut hollow = (float)Convert.ToDouble(rules.Data[idx++]); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); @@ -5507,12 +5507,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.Shape.PathCurve = (byte) Extrusion.Curve1; SetPrimitiveShapeParams(face, v, hollow, twist, taper_b, 5); break; - + case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_TORUS: if (remain < 11) return; - face = Convert.ToInt32(rules.Data[idx++]); // holeshape + face = Convert.ToInt32(rules.Data[idx++]); // holeshape v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut hollow = (float)Convert.ToDouble(rules.Data[idx++]); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); @@ -5526,12 +5526,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.Shape.PathCurve = (byte) Extrusion.Curve1; SetPrimitiveShapeParams(face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 0); break; - + case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_TUBE: if (remain < 11) return; - face = Convert.ToInt32(rules.Data[idx++]); // holeshape + face = Convert.ToInt32(rules.Data[idx++]); // holeshape v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut hollow = (float)Convert.ToDouble(rules.Data[idx++]); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); @@ -5545,12 +5545,12 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.Shape.PathCurve = (byte) Extrusion.Curve1; SetPrimitiveShapeParams(face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 1); break; - + case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_RING: if (remain < 11) return; - face = Convert.ToInt32(rules.Data[idx++]); // holeshape + face = Convert.ToInt32(rules.Data[idx++]); // holeshape v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut hollow = (float)Convert.ToDouble(rules.Data[idx++]); twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); @@ -5564,7 +5564,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.Shape.PathCurve = (byte) Extrusion.Curve1; SetPrimitiveShapeParams(face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 3); break; - + case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_SCULPT: if (remain < 2) return; @@ -5575,7 +5575,7 @@ namespace OpenSim.Region.ScriptEngine.Common SetPrimitiveShapeParams(map, face); break; } - + break; case (int)BuiltIn_Commands_BaseClass.PRIM_TEXTURE: @@ -5630,7 +5630,7 @@ namespace OpenSim.Region.ScriptEngine.Common float intensity = (float)Convert.ToDouble(rules.Data[idx++]); float radius = (float)Convert.ToDouble(rules.Data[idx++]); float falloff = (float)Convert.ToDouble(rules.Data[idx++]); - + SetPointLight(part, (light == 1), lightcolor, intensity, radius, falloff); break; @@ -5701,7 +5701,7 @@ namespace OpenSim.Region.ScriptEngine.Common public LSL_Types.list llGetAnimationList( string id ) { m_host.AddScriptLPS(1); - + LSL_Types.list l = new LSL_Types.list(); ScenePresence av = World.GetScenePresence(id); if (av == null) @@ -6560,7 +6560,7 @@ namespace OpenSim.Region.ScriptEngine.Common IConfigSource config = new IniConfigSource(Application.iniFilePath); if (config.Configs["LL-Functions"] == null) config.AddConfig("LL-Functions"); - + if (config.Configs["LL-Functions"].GetBoolean("AllowGodFunctions", false)) { if (World.ExternalChecks.ExternalChecksCanRunConsoleCommand(m_host.OwnerID)) @@ -6829,7 +6829,7 @@ namespace OpenSim.Region.ScriptEngine.Common //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) m_host.AddScriptLPS(1); for (int i = 0; i < commandList.Data.Length; i++) - { + { switch ((ParcelMediaCommandEnum)commandList.Data[i]) { case ParcelMediaCommandEnum.Play: @@ -6839,7 +6839,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (!agent.IsChildAgent) { agent.ControllingClient.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0); - } + } } break; case ParcelMediaCommandEnum.Stop: @@ -6870,7 +6870,7 @@ namespace OpenSim.Region.ScriptEngine.Common { //Set the new media URL only if the user is the owner of the land osSetParcelMediaURL(commandList.Data[i + 1].ToString()); - + List scenePresenceList = World.GetScenePresences(); LandData landData = World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); //Send an update of the mediaURL to all the clients that are in the parcel @@ -6881,8 +6881,8 @@ namespace OpenSim.Region.ScriptEngine.Common //Send parcel media update to the client agent.ControllingClient.SendParcelMediaUpdate(landData.MediaURL, landData.MediaID, landData.MediaAutoScale, "", landData.Description, 0, 0, 1); } - } - + } + } i++; } @@ -6892,7 +6892,7 @@ namespace OpenSim.Region.ScriptEngine.Common NotImplemented("llParcelMediaCommandList parameter do not supported yet: " + Enum.Parse(mediaCommandEnum.GetType(), commandList.Data[i].ToString()).ToString()); break; }//end switch - + } @@ -6935,7 +6935,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } return list; - + } public LSL_Types.LSLInteger llModPow(int a, int b, int c) @@ -6979,7 +6979,7 @@ namespace OpenSim.Region.ScriptEngine.Common { m_host.AddScriptLPS(1); LLUUID invItemID=InventorySelf(); - if (invItemID == LLUUID.Zero) + if (invItemID == LLUUID.Zero) return new LSL_Types.Vector3(); if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) return new LSL_Types.Vector3(); @@ -6989,7 +6989,7 @@ namespace OpenSim.Region.ScriptEngine.Common return new LSL_Types.Vector3(); } ScenePresence presence = World.GetScenePresence(m_host.OwnerID); - if (presence != null) + if (presence != null) { LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z); return pos; @@ -7111,8 +7111,8 @@ namespace OpenSim.Region.ScriptEngine.Common public void llSetCameraParams(LSL_Types.list rules) { m_host.AddScriptLPS(1); - - // our key in the object we are in + + // our key in the object we are in LLUUID invItemID=InventorySelf(); if (invItemID == LLUUID.Zero) return; @@ -7126,10 +7126,10 @@ namespace OpenSim.Region.ScriptEngine.Common if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; ScenePresence presence = World.GetScenePresence(agentID); - + // we are not interested in child-agents if (presence.IsChildAgent) return; - + SortedDictionary parameters = new SortedDictionary(); object[] data = rules.Data; for (int i = 0; i < data.Length; ++i) { @@ -7142,8 +7142,8 @@ namespace OpenSim.Region.ScriptEngine.Common case BuiltIn_Commands_BaseClass.CAMERA_FOCUS_OFFSET: case BuiltIn_Commands_BaseClass.CAMERA_POSITION: LSL_Types.Vector3 v = (LSL_Types.Vector3)data[i]; - parameters.Add(type + 1, (float)v.x); - parameters.Add(type + 2, (float)v.y); + parameters.Add(type + 1, (float)v.x); + parameters.Add(type + 2, (float)v.y); parameters.Add(type + 3, (float)v.z); break; default: @@ -7163,7 +7163,7 @@ namespace OpenSim.Region.ScriptEngine.Common { m_host.AddScriptLPS(1); - // our key in the object we are in + // our key in the object we are in LLUUID invItemID=InventorySelf(); if (invItemID == LLUUID.Zero) return; @@ -7177,10 +7177,10 @@ namespace OpenSim.Region.ScriptEngine.Common if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; ScenePresence presence = World.GetScenePresence(agentID); - + // we are not interested in child-agents if (presence.IsChildAgent) return; - + presence.ControllingClient.SendClearFollowCamProperties(objectID); } 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 // Otherwise, if we have strings, compare them alphabetically. string str1 = new string(space1); string str2 = new string(space2); - + int result; if (char.IsDigit(space1[0]) && char.IsDigit(space2[0])) @@ -1427,22 +1427,22 @@ namespace OpenSim.Region.ScriptEngine.Common bool ret = i1.value != i2.value; return ret; } - + static public LSLInteger operator +(LSLInteger i1, int i2) { return new LSLInteger(i1.value + i2); } - + static public LSLInteger operator -(LSLInteger i1, int i2) { return new LSLInteger(i1.value - i2); } - + static public LSLInteger operator *(LSLInteger i1, int i2) { return new LSLInteger(i1.value * i2); } - + static public LSLInteger operator /(LSLInteger i1, int i2) { return new LSLInteger(i1.value / i2); @@ -1452,22 +1452,22 @@ namespace OpenSim.Region.ScriptEngine.Common { return new LSLFloat((double)i1.value + f); } - + static public LSLFloat operator -(LSLInteger i1, double f) { return new LSLFloat((double)i1.value - f); } - + static public LSLFloat operator *(LSLInteger i1, double f) { return new LSLFloat((double)i1.value * f); } - + static public LSLFloat operator /(LSLInteger i1, double f) { return new LSLFloat((double)i1.value / f); } - + static public LSLInteger operator -(LSLInteger i) { return new LSLInteger(-i.value); @@ -1623,17 +1623,17 @@ namespace OpenSim.Region.ScriptEngine.Common f.value--; return f; } - + static public LSLFloat operator +(LSLFloat f, int i) { return new LSLFloat(f.value + (double)i); } - + static public LSLFloat operator -(LSLFloat f, int i) { return new LSLFloat(f.value - (double)i); } - + static public LSLFloat operator *(LSLFloat f, int i) { 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 { if (!DataserverRequests.ContainsKey(identifier)) return; - + ds=DataserverRequests[identifier]; DataserverRequests.Remove(identifier); } 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 /// Queue containing events waiting to be executed /// public Queue eventQueue = new Queue(); - + #region " Queue structures " /// /// Queue item structure @@ -193,7 +193,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase } #endregion - + #region " Shutdown all threads " ~EventQueueManager() { @@ -408,10 +408,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase // Set flag if script should be removed or not EventQueueThread.KillCurrentScript = KillScriptOnMaxFunctionExecutionTime; - + // Abort this thread AbortThreadClass(EventQueueThread); - + // We do not need to start another, MaintenenceThread will do that for us //StartNewThreadClass(); } 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 public class EventQueueThreadClass : iScriptEngineFunctionModule { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + /// /// How many ms to sleep if queue is empty /// 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 void remote_data(uint localID, LLUUID itemID); void http_response(uint localID, LLUUID itemID); } - + public interface ServerRemotingObject { RemoteEvents Events(); -- cgit v1.1