From a5b03f97657f26d992b9d0ff1f0a69cffa05e4b2 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 15:23:49 +0000 Subject: [PATCH] Decompile fn_07838 (C3dAttr::Height) Batch #12444 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_07838 C3dAttr::Height: logic confirmed by peer review Peer-reviewed-by: Yommy, gordaoprogramas, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Ground/TerrainHeight.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Contents/Ground/TerrainHeight.cpp b/Source/Contents/Ground/TerrainHeight.cpp index 98ab793c7..a2f2a96bc 100644 --- a/Source/Contents/Ground/TerrainHeight.cpp +++ b/Source/Contents/Ground/TerrainHeight.cpp @@ -26,8 +26,8 @@ float C3dAttr::Height(float x, float z) const { const float size = static_cast(this->cellSize); const float gridX = (static_cast(this->width) * size) * 0.5f + x; const float gridZ = (static_cast(this->height) * size) * 0.5f + z; - const int column = TruncateToInt(gridX / size); - const int row = TruncateToInt(gridZ / size); + const int column = static_cast(gridX / size); + const int row = static_cast(gridZ / size); if (column < 0 || column >= this->width || row < 0 || row >= this->height) { return 0.0f;