From 01f31fd933bbaec246d2fef5756b7d83be7980e0 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 1 May 2008 16:23:53 +0000 Subject: * Breaking all the code, breaking all the code..! * Made a bunch more members static, removed some dead code, general cleaning. --- OpenSim/Region/ClientStack/PacketQueue.cs | 4 ++-- .../Region/Physics/BulletXPlugin/BulletXPlugin.cs | 8 +++---- .../Common/ScriptEngineBase/AsyncCommandManager.cs | 2 +- .../OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | 28 +++++++++++----------- 4 files changed, 21 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region') 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 } - private int ScaleThrottle(int value, int curmax, int newmax) + private static int ScaleThrottle(int value, int curmax, int newmax) { - return (int) (((float) value/(float) curmax)*newmax); + return (value / curmax) * newmax; } 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 GC.Collect(); } - internal void BulletXMessage(string message, bool isWarning) + internal static void BulletXMessage(string message, bool isWarning) { PhysicsPluginManager.PhysicsPluginMessage("[Modified BulletX]:\t" + message, isWarning); } @@ -1455,7 +1455,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin } catch (Exception ex) { - _parent_scene.BulletXMessage(_parent_scene.is_ex_message + ex.Message, true); + BulletXScene.BulletXMessage(_parent_scene.is_ex_message + ex.Message, true); rigidBody.ActivationState = ActivationState.DisableSimulation; _parent_scene.AddForgottenRigidBody(rigidBody); } @@ -1532,10 +1532,10 @@ namespace OpenSim.Region.Physics.BulletXPlugin } catch (Exception ex) { - _parentscene.BulletXMessage(ex.Message, true); + BulletXScene.BulletXMessage(ex.Message, true); } } - _parentscene.BulletXMessage("BulletXPlanet created.", false); + BulletXScene.BulletXMessage("BulletXPlanet created.", false); } 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 StartThread(); } - private void StartThread() + private static void StartThread() { if (cmdHandlerThread == null) { 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 dt.Columns.Add(col); } - private DataTable createTerrainTable() + private static DataTable createTerrainTable() { DataTable terrain = new DataTable("terrain"); @@ -354,7 +354,7 @@ namespace OpenSim.DataStore.MSSQL return terrain; } - private DataTable createPrimTable() + private static DataTable createPrimTable() { DataTable prims = new DataTable("prims"); @@ -418,7 +418,7 @@ namespace OpenSim.DataStore.MSSQL return prims; } - private DataTable createShapeTable() + private static DataTable createShapeTable() { DataTable shapes = new DataTable("primshapes"); createCol(shapes, "UUID", typeof (String)); @@ -619,7 +619,7 @@ namespace OpenSim.DataStore.MSSQL } } - private PrimitiveBaseShape buildShape(DataRow row) + private static PrimitiveBaseShape buildShape(DataRow row) { PrimitiveBaseShape s = new PrimitiveBaseShape(); s.Scale = new LLVector3( @@ -675,7 +675,7 @@ namespace OpenSim.DataStore.MSSQL return s; } - private void fillShapeRow(DataRow row, SceneObjectPart prim) + private static void fillShapeRow(DataRow row, SceneObjectPart prim) { PrimitiveBaseShape s = prim.Shape; row["UUID"] = prim.UUID; @@ -770,7 +770,7 @@ namespace OpenSim.DataStore.MSSQL * **********************************************************************/ - private SqlCommand createInsertCommand(string table, DataTable dt) + private static SqlCommand createInsertCommand(string table, DataTable dt) { /** * This is subtle enough to deserve some commentary. @@ -804,7 +804,7 @@ namespace OpenSim.DataStore.MSSQL return cmd; } - private SqlCommand createUpdateCommand(string table, string pk, DataTable dt) + private static SqlCommand createUpdateCommand(string table, string pk, DataTable dt) { string sql = "update " + table + " set "; string subsql = String.Empty; @@ -831,7 +831,7 @@ namespace OpenSim.DataStore.MSSQL } - private string defineTable(DataTable dt) + private static string defineTable(DataTable dt) { string sql = "create table " + dt.TableName + "("; string subsql = String.Empty; @@ -854,7 +854,7 @@ namespace OpenSim.DataStore.MSSQL return sql; } - private void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val) + private static void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val) { row["RegionUUID"] = regionUUID; row["Revision"] = rev; @@ -890,7 +890,7 @@ namespace OpenSim.DataStore.MSSQL /// for us. /// ///a built Sql parameter - private SqlParameter createSqlParameter(string name, Type type) + private static SqlParameter createSqlParameter(string name, Type type) { SqlParameter param = new SqlParameter(); param.ParameterName = "@" + name; @@ -934,7 +934,7 @@ namespace OpenSim.DataStore.MSSQL da.InsertCommand.Connection = conn; } - private void InitDB(SqlConnection conn) + private static void InitDB(SqlConnection conn) { string createPrims = defineTable(createPrimTable()); string createShapes = defineTable(createShapeTable()); @@ -977,7 +977,7 @@ namespace OpenSim.DataStore.MSSQL conn.Close(); } - private bool TestTables(SqlConnection conn) + private static bool TestTables(SqlConnection conn) { SqlCommand primSelectCmd = new SqlCommand(primSelect, conn); SqlDataAdapter pDa = new SqlDataAdapter(primSelectCmd); @@ -1046,7 +1046,7 @@ namespace OpenSim.DataStore.MSSQL * **********************************************************************/ - private DbType dbtypeFromType(Type type) + private static DbType dbtypeFromType(Type type) { if (type == typeof (String)) { @@ -1072,7 +1072,7 @@ namespace OpenSim.DataStore.MSSQL // this is something we'll need to implement for each db // slightly differently. - private string SqlType(Type type) + private static string SqlType(Type type) { if (type == typeof (String)) { -- cgit v1.1