reverse XY

master
Christopher Latza 2020-06-10 22:14:59 +02:00
parent 8642a3dcce
commit ceeac217d6
1 changed files with 5 additions and 3 deletions

View File

@ -141,16 +141,18 @@ namespace OpenSim.Modules.PathFinding
for (int X = 0; X < m_scene.RegionInfo.RegionSizeX; X++) for (int X = 0; X < m_scene.RegionInfo.RegionSizeX; X++)
{ {
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 _imageY = (int)m_scene.RegionInfo.RegionSizeY - Y;
float baseheight = (float)m_scene.Heightmap[X, Y]; float baseheight = (float)m_scene.Heightmap[X, Y];
if (baseheight <= m_scene.RegionInfo.RegionSettings.WaterHeight) if (baseheight <= m_scene.RegionInfo.RegionSettings.WaterHeight)
_map.SetPixel(X, Y, Color.Blue); _map.SetPixel(_imageX, _imageY, Color.Blue);
if (baseheight > m_scene.RegionInfo.RegionSettings.WaterHeight) if (baseheight > m_scene.RegionInfo.RegionSettings.WaterHeight)
_map.SetPixel(X, Y, Color.Green); _map.SetPixel(_imageX, _imageY, Color.Green);
} }
} }