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).
This commit is contained in:
ragnarok-clanker 2026-11-05 15:23:49 +00:00
commit a5b03f9765

View file

@ -26,8 +26,8 @@ float C3dAttr::Height(float x, float z) const {
const float size = static_cast<float>(this->cellSize);
const float gridX = (static_cast<float>(this->width) * size) * 0.5f + x;
const float gridZ = (static_cast<float>(this->height) * size) * 0.5f + z;
const int column = TruncateToInt(gridX / size);
const int row = TruncateToInt(gridZ / size);
const int column = static_cast<int>(gridX / size);
const int row = static_cast<int>(gridZ / size);
if (column < 0 || column >= this->width || row < 0 || row >= this->height) {
return 0.0f;