fixed part of the bug from 116 (should no longer get the repeated Failed with exception System.IndexOutOfRangeException: Array index is out of range error)

This commit is contained in:
MW
2007-05-15 20:44:14 +00:00
parent 1e00633e6c
commit ccf046e8e2
4 changed files with 118 additions and 2 deletions

View File

@@ -107,7 +107,10 @@ namespace OpenSim.Physics.BasicPhysicsPlugin
}
if(actor.Position.Z < (_heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X]+1))
{*/
actor.Position.Z = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X]+1;
if (actor.Position.Y > 0 && actor.Position.Y < 256 && actor.Position.X > 0 && actor.Position.X < 256)
{
actor.Position.Z = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1;
}
//}