From f3afa68a2af6ad5999e6efe3e4725cb17293108d Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 14 Feb 2008 12:16:33 +0000 Subject: * Made new Framework.Constants class, added RegionSize member. * Converted all instances of "256" spotted to use RegionSize instead. Some approximations used for border crossings (ie 255.9f) are still using that value, but should be updated to use something based on RegionSize. * Moving Terrain to a RegionModule, implemented ITerrainChannel and TerrainModule - nonfunctional, but will be soon. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin/OdePlugin.cs') diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 4fbf653..3d70a3d 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -85,9 +85,9 @@ namespace OpenSim.Region.Physics.OdePlugin private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); CollisionLocker ode; - // TODO: this should be hard-coded in some common place - private const uint m_regionWidth = 256; - private const uint m_regionHeight = 256; + + private const uint m_regionWidth = Constants.RegionSize; + private const uint m_regionHeight = Constants.RegionSize; private static float ODE_STEPSIZE = 0.020f; private static bool RENDER_FLAG = false; @@ -585,7 +585,7 @@ namespace OpenSim.Region.Physics.OdePlugin } private float GetTerrainHeightAtXY(float x, float y) { - return (float)_origheightmap[(int) y*256 + (int) x]; + return (float)_origheightmap[(int)y * Constants.RegionSize + (int)x]; } -- cgit v1.1