aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 0a6faa8..7a01702 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -1295,6 +1295,15 @@ namespace OpenSim.Region.Physics.OdePlugin
1295// Recovered for use by fly height. Kitto Flora 1295// Recovered for use by fly height. Kitto Flora
1296 public float GetTerrainHeightAtXY(float x, float y) 1296 public float GetTerrainHeightAtXY(float x, float y)
1297 { 1297 {
1298 // Teravus: Kitto, this code causes recurring errors that stall physics permenantly unless
1299 // the values are checked, so checking below.
1300 // Is there any reason that we don't do this in ScenePresence?
1301 // The only physics engine that benefits from it in the physics plugin is this one
1302
1303 if ((int)x > Constants.RegionSize || (int)y > Constants.RegionSize ||
1304 (int)x < 0.001f || (int)y < 0.001f)
1305 return 0;
1306
1298 return (float)_origheightmap[(int)y * Constants.RegionSize + (int)x]; 1307 return (float)_origheightmap[(int)y * Constants.RegionSize + (int)x];
1299 } 1308 }
1300// End recovered. Kitto Flora 1309// End recovered. Kitto Flora