* Fix for GetTerrainHeightAtXY to make it compatible when Constants.RegionSize isn't 256

remotes/origin/0.6.7-post-fixes
Teravus Ovares (Dan Olivares) 2009-09-04 02:48:07 -04:00
parent 9f05edab04
commit b93f512433
1 changed files with 4 additions and 3 deletions

View File

@ -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;