From c995d60d37032db3198b8496e186aa7a892dc7a8 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 14 May 2008 05:11:23 +0000 Subject: Formatting cleanup. --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 86 ++++++++++++---------- 1 file changed, 46 insertions(+), 40 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 4050f36..61b577e 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -137,7 +137,7 @@ namespace OpenSim.Region.ScriptEngine.Common foreach (KeyValuePair inv in m_host.TaskInventory) { - if(inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) + if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) { invItemID=inv.Key; break; @@ -152,9 +152,9 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.AddScriptLPS(1); foreach (KeyValuePair inv in m_host.TaskInventory) { - if(inv.Value.Name == name) + if (inv.Value.Name == name) { - if(inv.Value.Type != type) + if (inv.Value.Type != type) return LLUUID.Zero; return inv.Value.AssetID.ToString(); @@ -168,7 +168,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.AddScriptLPS(1); foreach (KeyValuePair inv in m_host.TaskInventory) { - if(inv.Value.Name == name) + if (inv.Value.Name == name) { return inv.Value.AssetID.ToString(); } @@ -362,11 +362,11 @@ namespace OpenSim.Region.ScriptEngine.Common double x,y,z,s; double c1 = Math.Cos(v.y / 2); - double s1 = Math.Sin(v.y / 2 ); - double c2 = Math.Cos(v.z / 2 ); - double s2 = Math.Sin(v.z / 2 ); - double c3 = Math.Cos(v.x / 2 ); - double s3 = Math.Sin(v.x / 2 ); + double s1 = Math.Sin(v.y / 2); + double c2 = Math.Cos(v.z / 2); + double s2 = Math.Sin(v.z / 2); + double c3 = Math.Cos(v.x / 2); + double s3 = Math.Sin(v.x / 2); double c1c2 = c1 * c2; double s1s2 = s1 * s2; @@ -2900,7 +2900,7 @@ namespace OpenSim.Region.ScriptEngine.Common { rotation rot = llEuler2Rot(<0,70,0> * DEG_TO_RAD); - llOwnerSay("to get here, we rotate over: "+ (string) llRot2Axis(rot) ); + llOwnerSay("to get here, we rotate over: "+ (string) llRot2Axis(rot)); llOwnerSay("and we rotate for: "+ (llRot2Angle(rot) * RAD_TO_DEG)); // convert back and forth between quaternion <-> vector and angle @@ -3339,14 +3339,13 @@ namespace OpenSim.Region.ScriptEngine.Common if (src.Data.Length > 0) { ret = src.Data[x++].ToString(); - for(;x @@ -3367,9 +3366,9 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.AddScriptLPS(1); - for(int i=0; i 0) - for(int i=0;i=si[0]) result.Add(src.Data[i]); if (twopass && i>=si[1] && i<=ei[1]) result.Add(src.Data[i]); } + } else if (stride < 0) - for(int i=src.Length-1;i>=0;i+=stride) + { + for (int i = src.Length - 1; i >= 0; i += stride) { - if (i<=ei[0] && i>=si[0]) + if (i <= ei[0] && i >= si[0]) result.Add(src.Data[i]); - if (twopass && i>=si[1] && i<=ei[1]) + if (twopass && i >= si[1] && i <= ei[1]) result.Add(src.Data[i]); } + } } return result; - } public LSL_Types.Vector3 llGetRegionCorner() @@ -3635,12 +3639,12 @@ namespace OpenSim.Region.ScriptEngine.Common if (src.Length != 0 && test.Length != 0) { - for(int i=0; i< length; i++) + for (int i = 0; i < length; i++) { if (src.Data[i].Equals(test.Data[0])) { int j; - for(j=1;j beginning); j++) + for (j = seplen; (j < mlen) && (offset[best] > beginning); j++) { if (active[j]) { @@ -6174,7 +6180,7 @@ namespace OpenSim.Region.ScriptEngine.Common { foreach (object o in args.Data) { - switch(o.ToString()) + switch (o.ToString()) { case "1": ret.Add(av.Firstname + " " + av.Lastname); @@ -6207,9 +6213,9 @@ namespace OpenSim.Region.ScriptEngine.Common SceneObjectPart obj = World.GetSceneObjectPart(key); if (obj != null) { - foreach(object o in args.Data) + foreach (object o in args.Data) { - switch(o.ToString()) + switch (o.ToString()) { case "1": ret.Add(obj.Name); -- cgit v1.1