From 7f4b209633f5b309fb1f4229d7966589ea51e468 Mon Sep 17 00:00:00 2001 From: WiredSpast <74211155+WiredSpast@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:24:36 +0200 Subject: [PATCH] Bug fix HHeightMap --- g_python/hparsers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g_python/hparsers.py b/g_python/hparsers.py index 2d368e4..80a1452 100644 --- a/g_python/hparsers.py +++ b/g_python/hparsers.py @@ -508,8 +508,8 @@ def coords_to_index(self, x: int, y: int) -> int: return int(y * self.width + x) def index_to_coords(self, index: int) -> (int, int): - y = int(index % self.width) - x = int((index - y) / self.width) + x = index % self.width + y = index // self.width return x, y def get_tile_value(self, x: int, y: int) -> int: