From b93f512433a7e1fb4bd760bbf9d82bedfe898773 Mon Sep 17 00:00:00 2001 From: "Teravus Ovares (Dan Olivares)" Date: Fri, 4 Sep 2009 02:48:07 -0400 Subject: [PATCH] * Fix for GetTerrainHeightAtXY to make it compatible when Constants.RegionSize isn't 256 --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 572412a0b5..fea288e387 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1564,12 +1564,13 @@ namespace OpenSim.Region.Physics.OdePlugin m_parentScene = pScene; } -// Recovered for use by fly height. Kitto Flora + + // Recovered for use by fly height. Kitto Flora public float GetTerrainHeightAtXY(float x, float y) { - int offsetX = ((int) (x/256)) * 256; - int offsetY = ((int) (y/256)) * 256; + int offsetX = ((int)(x / (int)Constants.RegionSize)) * (int)Constants.RegionSize; + int offsetY = ((int)(y / (int)Constants.RegionSize)) * (int)Constants.RegionSize; IntPtr heightFieldGeom = IntPtr.Zero;