bitmap overflow

master
Christopher Latza 2020-06-10 22:19:25 +02:00
parent ceeac217d6
commit fea47de571
1 changed files with 2 additions and 2 deletions

View File

@ -143,8 +143,8 @@ namespace OpenSim.Modules.PathFinding
{ {
for (int Y = 0; Y < m_scene.RegionInfo.RegionSizeY; Y++) for (int Y = 0; Y < m_scene.RegionInfo.RegionSizeY; Y++)
{ {
int _imageX = (int)m_scene.RegionInfo.RegionSizeX - X; int _imageX = ((int)m_scene.RegionInfo.RegionSizeX - 1) - X;
int _imageY = (int)m_scene.RegionInfo.RegionSizeY - Y; int _imageY = ((int)m_scene.RegionInfo.RegionSizeY - 1) - Y;
float baseheight = (float)m_scene.Heightmap[X, Y]; float baseheight = (float)m_scene.Heightmap[X, Y];