From f195725db447aad7595810a9950f656163bf1c13 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 4 Dec 2007 22:14:53 +0000 Subject: keeping opensim safe for children -- made some namespace references less explicit --- OpenSim/Region/Physics/Manager/PhysicsScene.cs | 2 +- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 8 ++++---- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 22 +++------------------- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 21 +++++++++++---------- 4 files changed, 19 insertions(+), 34 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 56a1842..5de22e7 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs @@ -130,7 +130,7 @@ namespace OpenSim.Region.Physics.Manager { m_workIndicator = (m_workIndicator + 1)%10; - //OpenSim.Framework.Console.MainLog.Instance.SetStatus(m_workIndicator.ToString()); + //MainLog.Instance.SetStatus(m_workIndicator.ToString()); } public override void GetResults() diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 1e15f5e..91e44f3 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Axiom.Math; using Ode.NET; using OpenSim.Framework; +using OpenSim.Framework.Console; using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Physics.OdePlugin @@ -229,7 +230,7 @@ namespace OpenSim.Region.Physics.OdePlugin CAPSULE_LENGTH = (SetSize.Z - ((SetSize.Z * 0.43f))); // subtract 43% of the size d.BodyDestroy(Body); d.GeomDestroy(Shell); - //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "Set Avatar Height To: " + (CAPSULE_RADIUS + CAPSULE_LENGTH)); + //MainLog.Instance.Verbose("PHYSICS", "Set Avatar Height To: " + (CAPSULE_RADIUS + CAPSULE_LENGTH)); Shell = d.CreateCapsule(_parent_scene.space, capsuleradius, CAPSULE_LENGTH); d.MassSetCapsule(out ShellMass, 50.0f, 3, CAPSULE_RADIUS, CAPSULE_LENGTH); Body = d.BodyCreate(_parent_scene.world); @@ -428,13 +429,12 @@ namespace OpenSim.Region.Physics.OdePlugin int[] arrayitem = _parent_scene.calculateSpaceArrayItemFromPos(_position); if (primScenAvatarIn == "0") { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Avatar " + m_name + " in space with no prim. Arr:':" + arrayitem[0].ToString() + "," + arrayitem[1].ToString()); + MainLog.Instance.Verbose("Physics", "Avatar " + m_name + " in space with no prim. Arr:':" + arrayitem[0].ToString() + "," + arrayitem[1].ToString()); } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Avatar " + m_name + " in Prim space':" + primScenAvatarIn + ". Arr:" + arrayitem[0].ToString() + "," + arrayitem[1].ToString()); + MainLog.Instance.Verbose("Physics", "Avatar " + m_name + " in Prim space':" + primScenAvatarIn + ". Arr:" + arrayitem[0].ToString() + "," + arrayitem[1].ToString()); } - } } else diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 19de4ca..b81dba7 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Axiom.Math; using Ode.NET; using OpenSim.Framework; +using OpenSim.Framework.Console; using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Physics.OdePlugin @@ -47,12 +48,9 @@ namespace OpenSim.Region.Physics.OdePlugin private const float MassMultiplier = 150f; // Ref: Water: 1000kg.. this iset to 500 private int debugcounter = 0; - public OdePrim(String primName, OdeScene parent_scene, IntPtr targetSpace, PhysicsVector pos, PhysicsVector size, Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical) { - - _velocity = new PhysicsVector(); _position = pos; m_taintposition = pos; @@ -98,8 +96,6 @@ namespace OpenSim.Region.Physics.OdePlugin } m_primName = primName; - - lock (OdeScene.OdeLock) { if (mesh != null) @@ -243,11 +239,11 @@ namespace OpenSim.Region.Physics.OdePlugin int[] arrayitem = _parent_scene.calculateSpaceArrayItemFromPos(_position); if (primScenAvatarIn == "0") { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Prim " + m_primName + " in space with no prim: " + primScenAvatarIn + ". Expected to be at: " + m_targetSpace.ToString() + " . Arr:': " + arrayitem[0].ToString() + "," + arrayitem[1].ToString()); + MainLog.Instance.Verbose("Physics", "Prim " + m_primName + " in space with no prim: " + primScenAvatarIn + ". Expected to be at: " + m_targetSpace.ToString() + " . Arr:': " + arrayitem[0].ToString() + "," + arrayitem[1].ToString()); } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Prim " + m_primName + " in Prim space with prim: " + primScenAvatarIn + ". Expected to be at: " + m_targetSpace.ToString() + ". Arr:" + arrayitem[0].ToString() + "," + arrayitem[1].ToString()); + MainLog.Instance.Verbose("Physics", "Prim " + m_primName + " in Prim space with prim: " + primScenAvatarIn + ". Expected to be at: " + m_targetSpace.ToString() + ". Arr:" + arrayitem[0].ToString() + "," + arrayitem[1].ToString()); } m_targetSpace = _parent_scene.recalculateSpaceForGeom(prim_geom, _position, m_targetSpace); d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); @@ -361,13 +357,10 @@ namespace OpenSim.Region.Physics.OdePlugin enableBody(); d.BodyEnable(Body); } - } - _parent_scene.geom_name_map[prim_geom] = oldname; - m_taintsize = _size; } public void changeshape(float timestamp) @@ -382,9 +375,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.GeomDestroy(prim_geom); if (_mesh != null) { - d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); - } // Construction of new prim @@ -421,9 +412,6 @@ namespace OpenSim.Region.Physics.OdePlugin } _parent_scene.geom_name_map[prim_geom] = oldname; - - - m_taintshape = false; } public override bool IsPhysical @@ -470,7 +458,6 @@ namespace OpenSim.Region.Physics.OdePlugin { get { return _position; } - set { _position = value; @@ -484,7 +471,6 @@ namespace OpenSim.Region.Physics.OdePlugin set { _size = value; - } } @@ -493,7 +479,6 @@ namespace OpenSim.Region.Physics.OdePlugin set { _pbs = value; - } } @@ -634,7 +619,6 @@ namespace OpenSim.Region.Physics.OdePlugin base.RequestPhysicsterseUpdate(); m_lastUpdateSent = true; } - } else { diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 1e05274..845d4f9 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -31,6 +31,7 @@ using System.Collections.Generic; using Axiom.Math; using Ode.NET; using OpenSim.Framework; +using OpenSim.Framework.Console; using OpenSim.Region.Physics.Manager; //using OpenSim.Region.Physics.OdePlugin.Meshing; @@ -242,7 +243,7 @@ namespace OpenSim.Region.Physics.OdePlugin } catch (System.Runtime.InteropServices.SEHException) { - OpenSim.Framework.Console.MainLog.Instance.Error("PHYSICS", "The Operating system shut down ODE because of corrupt memory. This could be a result of really irregular terrain. If this repeats continuously, restart using Basic Physics and terrain fill your terrain. Restarting the sim."); + MainLog.Instance.Error("PHYSICS", "The Operating system shut down ODE because of corrupt memory. This could be a result of really irregular terrain. If this repeats continuously, restart using Basic Physics and terrain fill your terrain. Restarting the sim."); base.TriggerPhysicsBasedRestart(); } @@ -438,7 +439,7 @@ namespace OpenSim.Region.Physics.OdePlugin } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'removeprim from scene':" + ((OdePrim)prim).m_targetSpace.ToString()); + MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'removeprim from scene':" + ((OdePrim)prim).m_targetSpace.ToString()); } } } @@ -460,7 +461,7 @@ namespace OpenSim.Region.Physics.OdePlugin } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'removeprim from scene':" + ((OdePrim)prim).m_targetSpace.ToString()); + MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'removeprim from scene':" + ((OdePrim)prim).m_targetSpace.ToString()); } } } @@ -508,7 +509,7 @@ namespace OpenSim.Region.Physics.OdePlugin } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'recalculatespace':" + currentspace.ToString() + " Geom:" + geom.ToString()); + MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'recalculatespace':" + currentspace.ToString() + " Geom:" + geom.ToString()); } } else @@ -523,7 +524,7 @@ namespace OpenSim.Region.Physics.OdePlugin } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'recalculatespace':" + sGeomIsIn.ToString() + " Geom:" + geom.ToString()); + MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'recalculatespace':" + sGeomIsIn.ToString() + " Geom:" + geom.ToString()); } } } @@ -543,7 +544,7 @@ namespace OpenSim.Region.Physics.OdePlugin } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'recalculatespace':" + currentspace.ToString() + " Geom:" + geom.ToString()); + MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'recalculatespace':" + currentspace.ToString() + " Geom:" + geom.ToString()); } } @@ -561,7 +562,7 @@ namespace OpenSim.Region.Physics.OdePlugin } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'recalculatespace':" + currentspace.ToString() + " Geom:" + geom.ToString()); + MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'recalculatespace':" + currentspace.ToString() + " Geom:" + geom.ToString()); } } @@ -578,7 +579,7 @@ namespace OpenSim.Region.Physics.OdePlugin } else { - OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'recalculatespace':" + sGeomIsIn.ToString() + " Geom:" + geom.ToString()); + MainLog.Instance.Verbose("Physics", "Invalid Scene passed to 'recalculatespace':" + sGeomIsIn.ToString() + " Geom:" + geom.ToString()); } } @@ -612,7 +613,7 @@ namespace OpenSim.Region.Physics.OdePlugin public IntPtr calculateSpaceForGeom(PhysicsVector pos) { int[] xyspace = calculateSpaceArrayItemFromPos(pos); - //OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); + //MainLog.Instance.Verbose("Physics", "Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); IntPtr locationbasedspace = staticPrimspace[xyspace[0],xyspace[1]]; //locationbasedspace = space; @@ -818,7 +819,7 @@ namespace OpenSim.Region.Physics.OdePlugin } catch (System.StackOverflowException) { - OpenSim.Framework.Console.MainLog.Instance.Error("PHYSICS", "The operating system wasn't able to allocate enough memory for the simulation. Restarting the sim."); + MainLog.Instance.Error("PHYSICS", "The operating system wasn't able to allocate enough memory for the simulation. Restarting the sim."); base.TriggerPhysicsBasedRestart(); } -- cgit v1.1