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:
parent
01e8f159e4
commit
a5b03f9765
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue