diff options
author | Adam Frisby | 2008-05-01 16:23:53 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-01 16:23:53 +0000 |
commit | 01f31fd933bbaec246d2fef5756b7d83be7980e0 (patch) | |
tree | 45ce7727e83238bf492924bea3ff5f0b6c82acbc /OpenSim/Region | |
parent | * In ur code. Making it static. (diff) | |
download | opensim-SC-01f31fd933bbaec246d2fef5756b7d83be7980e0.zip opensim-SC-01f31fd933bbaec246d2fef5756b7d83be7980e0.tar.gz opensim-SC-01f31fd933bbaec246d2fef5756b7d83be7980e0.tar.bz2 opensim-SC-01f31fd933bbaec246d2fef5756b7d83be7980e0.tar.xz |
* Breaking all the code, breaking all the code..!
* Made a bunch more members static, removed some dead code, general cleaning.
Diffstat (limited to 'OpenSim/Region')
4 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Region/ClientStack/PacketQueue.cs b/OpenSim/Region/ClientStack/PacketQueue.cs index 54c9fdc..7101b4c 100644 --- a/OpenSim/Region/ClientStack/PacketQueue.cs +++ b/OpenSim/Region/ClientStack/PacketQueue.cs | |||
@@ -377,9 +377,9 @@ namespace OpenSim.Region.ClientStack | |||
377 | } | 377 | } |
378 | 378 | ||
379 | 379 | ||
380 | private int ScaleThrottle(int value, int curmax, int newmax) | 380 | private static int ScaleThrottle(int value, int curmax, int newmax) |
381 | { | 381 | { |
382 | return (int) (((float) value/(float) curmax)*newmax); | 382 | return (value / curmax) * newmax; |
383 | } | 383 | } |
384 | 384 | ||
385 | public byte[] GetThrottlesPacked(float multiplier) | 385 | public byte[] GetThrottlesPacked(float multiplier) |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 40de537..f3b3a20 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -653,7 +653,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
653 | GC.Collect(); | 653 | GC.Collect(); |
654 | } | 654 | } |
655 | 655 | ||
656 | internal void BulletXMessage(string message, bool isWarning) | 656 | internal static void BulletXMessage(string message, bool isWarning) |
657 | { | 657 | { |
658 | PhysicsPluginManager.PhysicsPluginMessage("[Modified BulletX]:\t" + message, isWarning); | 658 | PhysicsPluginManager.PhysicsPluginMessage("[Modified BulletX]:\t" + message, isWarning); |
659 | } | 659 | } |
@@ -1455,7 +1455,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
1455 | } | 1455 | } |
1456 | catch (Exception ex) | 1456 | catch (Exception ex) |
1457 | { | 1457 | { |
1458 | _parent_scene.BulletXMessage(_parent_scene.is_ex_message + ex.Message, true); | 1458 | BulletXScene.BulletXMessage(_parent_scene.is_ex_message + ex.Message, true); |
1459 | rigidBody.ActivationState = ActivationState.DisableSimulation; | 1459 | rigidBody.ActivationState = ActivationState.DisableSimulation; |
1460 | _parent_scene.AddForgottenRigidBody(rigidBody); | 1460 | _parent_scene.AddForgottenRigidBody(rigidBody); |
1461 | } | 1461 | } |
@@ -1532,10 +1532,10 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
1532 | } | 1532 | } |
1533 | catch (Exception ex) | 1533 | catch (Exception ex) |
1534 | { | 1534 | { |
1535 | _parentscene.BulletXMessage(ex.Message, true); | 1535 | BulletXScene.BulletXMessage(ex.Message, true); |
1536 | } | 1536 | } |
1537 | } | 1537 | } |
1538 | _parentscene.BulletXMessage("BulletXPlanet created.", false); | 1538 | BulletXScene.BulletXMessage("BulletXPlanet created.", false); |
1539 | } | 1539 | } |
1540 | 1540 | ||
1541 | internal float HeightValue(Vector3 position) | 1541 | internal float HeightValue(Vector3 position) |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs index 7dad7ee..f3af621 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
66 | StartThread(); | 66 | StartThread(); |
67 | } | 67 | } |
68 | 68 | ||
69 | private void StartThread() | 69 | private static void StartThread() |
70 | { | 70 | { |
71 | if (cmdHandlerThread == null) | 71 | if (cmdHandlerThread == null) |
72 | { | 72 | { |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs index c4a721e..39babd6 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | |||
@@ -343,7 +343,7 @@ namespace OpenSim.DataStore.MSSQL | |||
343 | dt.Columns.Add(col); | 343 | dt.Columns.Add(col); |
344 | } | 344 | } |
345 | 345 | ||
346 | private DataTable createTerrainTable() | 346 | private static DataTable createTerrainTable() |
347 | { | 347 | { |
348 | DataTable terrain = new DataTable("terrain"); | 348 | DataTable terrain = new DataTable("terrain"); |
349 | 349 | ||
@@ -354,7 +354,7 @@ namespace OpenSim.DataStore.MSSQL | |||
354 | return terrain; | 354 | return terrain; |
355 | } | 355 | } |
356 | 356 | ||
357 | private DataTable createPrimTable() | 357 | private static DataTable createPrimTable() |
358 | { | 358 | { |
359 | DataTable prims = new DataTable("prims"); | 359 | DataTable prims = new DataTable("prims"); |
360 | 360 | ||
@@ -418,7 +418,7 @@ namespace OpenSim.DataStore.MSSQL | |||
418 | return prims; | 418 | return prims; |
419 | } | 419 | } |
420 | 420 | ||
421 | private DataTable createShapeTable() | 421 | private static DataTable createShapeTable() |
422 | { | 422 | { |
423 | DataTable shapes = new DataTable("primshapes"); | 423 | DataTable shapes = new DataTable("primshapes"); |
424 | createCol(shapes, "UUID", typeof (String)); | 424 | createCol(shapes, "UUID", typeof (String)); |
@@ -619,7 +619,7 @@ namespace OpenSim.DataStore.MSSQL | |||
619 | } | 619 | } |
620 | } | 620 | } |
621 | 621 | ||
622 | private PrimitiveBaseShape buildShape(DataRow row) | 622 | private static PrimitiveBaseShape buildShape(DataRow row) |
623 | { | 623 | { |
624 | PrimitiveBaseShape s = new PrimitiveBaseShape(); | 624 | PrimitiveBaseShape s = new PrimitiveBaseShape(); |
625 | s.Scale = new LLVector3( | 625 | s.Scale = new LLVector3( |
@@ -675,7 +675,7 @@ namespace OpenSim.DataStore.MSSQL | |||
675 | return s; | 675 | return s; |
676 | } | 676 | } |
677 | 677 | ||
678 | private void fillShapeRow(DataRow row, SceneObjectPart prim) | 678 | private static void fillShapeRow(DataRow row, SceneObjectPart prim) |
679 | { | 679 | { |
680 | PrimitiveBaseShape s = prim.Shape; | 680 | PrimitiveBaseShape s = prim.Shape; |
681 | row["UUID"] = prim.UUID; | 681 | row["UUID"] = prim.UUID; |
@@ -770,7 +770,7 @@ namespace OpenSim.DataStore.MSSQL | |||
770 | * | 770 | * |
771 | **********************************************************************/ | 771 | **********************************************************************/ |
772 | 772 | ||
773 | private SqlCommand createInsertCommand(string table, DataTable dt) | 773 | private static SqlCommand createInsertCommand(string table, DataTable dt) |
774 | { | 774 | { |
775 | /** | 775 | /** |
776 | * This is subtle enough to deserve some commentary. | 776 | * This is subtle enough to deserve some commentary. |
@@ -804,7 +804,7 @@ namespace OpenSim.DataStore.MSSQL | |||
804 | return cmd; | 804 | return cmd; |
805 | } | 805 | } |
806 | 806 | ||
807 | private SqlCommand createUpdateCommand(string table, string pk, DataTable dt) | 807 | private static SqlCommand createUpdateCommand(string table, string pk, DataTable dt) |
808 | { | 808 | { |
809 | string sql = "update " + table + " set "; | 809 | string sql = "update " + table + " set "; |
810 | string subsql = String.Empty; | 810 | string subsql = String.Empty; |
@@ -831,7 +831,7 @@ namespace OpenSim.DataStore.MSSQL | |||
831 | } | 831 | } |
832 | 832 | ||
833 | 833 | ||
834 | private string defineTable(DataTable dt) | 834 | private static string defineTable(DataTable dt) |
835 | { | 835 | { |
836 | string sql = "create table " + dt.TableName + "("; | 836 | string sql = "create table " + dt.TableName + "("; |
837 | string subsql = String.Empty; | 837 | string subsql = String.Empty; |
@@ -854,7 +854,7 @@ namespace OpenSim.DataStore.MSSQL | |||
854 | return sql; | 854 | return sql; |
855 | } | 855 | } |
856 | 856 | ||
857 | private void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val) | 857 | private static void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val) |
858 | { | 858 | { |
859 | row["RegionUUID"] = regionUUID; | 859 | row["RegionUUID"] = regionUUID; |
860 | row["Revision"] = rev; | 860 | row["Revision"] = rev; |
@@ -890,7 +890,7 @@ namespace OpenSim.DataStore.MSSQL | |||
890 | /// for us. | 890 | /// for us. |
891 | ///</summary> | 891 | ///</summary> |
892 | ///<returns>a built Sql parameter</returns> | 892 | ///<returns>a built Sql parameter</returns> |
893 | private SqlParameter createSqlParameter(string name, Type type) | 893 | private static SqlParameter createSqlParameter(string name, Type type) |
894 | { | 894 | { |
895 | SqlParameter param = new SqlParameter(); | 895 | SqlParameter param = new SqlParameter(); |
896 | param.ParameterName = "@" + name; | 896 | param.ParameterName = "@" + name; |
@@ -934,7 +934,7 @@ namespace OpenSim.DataStore.MSSQL | |||
934 | da.InsertCommand.Connection = conn; | 934 | da.InsertCommand.Connection = conn; |
935 | } | 935 | } |
936 | 936 | ||
937 | private void InitDB(SqlConnection conn) | 937 | private static void InitDB(SqlConnection conn) |
938 | { | 938 | { |
939 | string createPrims = defineTable(createPrimTable()); | 939 | string createPrims = defineTable(createPrimTable()); |
940 | string createShapes = defineTable(createShapeTable()); | 940 | string createShapes = defineTable(createShapeTable()); |
@@ -977,7 +977,7 @@ namespace OpenSim.DataStore.MSSQL | |||
977 | conn.Close(); | 977 | conn.Close(); |
978 | } | 978 | } |
979 | 979 | ||
980 | private bool TestTables(SqlConnection conn) | 980 | private static bool TestTables(SqlConnection conn) |
981 | { | 981 | { |
982 | SqlCommand primSelectCmd = new SqlCommand(primSelect, conn); | 982 | SqlCommand primSelectCmd = new SqlCommand(primSelect, conn); |
983 | SqlDataAdapter pDa = new SqlDataAdapter(primSelectCmd); | 983 | SqlDataAdapter pDa = new SqlDataAdapter(primSelectCmd); |
@@ -1046,7 +1046,7 @@ namespace OpenSim.DataStore.MSSQL | |||
1046 | * | 1046 | * |
1047 | **********************************************************************/ | 1047 | **********************************************************************/ |
1048 | 1048 | ||
1049 | private DbType dbtypeFromType(Type type) | 1049 | private static DbType dbtypeFromType(Type type) |
1050 | { | 1050 | { |
1051 | if (type == typeof (String)) | 1051 | if (type == typeof (String)) |
1052 | { | 1052 | { |
@@ -1072,7 +1072,7 @@ namespace OpenSim.DataStore.MSSQL | |||
1072 | 1072 | ||
1073 | // this is something we'll need to implement for each db | 1073 | // this is something we'll need to implement for each db |
1074 | // slightly differently. | 1074 | // slightly differently. |
1075 | private string SqlType(Type type) | 1075 | private static string SqlType(Type type) |
1076 | { | 1076 | { |
1077 | if (type == typeof (String)) | 1077 | if (type == typeof (String)) |
1078 | { | 1078 | { |