mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 00:41:33 +00:00
Fix terrain assertion
This commit is contained in:
parent
235683e449
commit
f7e32a24c9
1 changed files with 2 additions and 2 deletions
|
@ -402,8 +402,8 @@ namespace ESMTerrain
|
||||||
int endX = startX + 1;
|
int endX = startX + 1;
|
||||||
int endY = startY + 1;
|
int endY = startY + 1;
|
||||||
|
|
||||||
assert(endX < ESM::Land::LAND_SIZE);
|
endX = std::min(endX, ESM::Land::LAND_SIZE-1);
|
||||||
assert(endY < ESM::Land::LAND_SIZE);
|
endY = std::min(endY, ESM::Land::LAND_SIZE-1);
|
||||||
|
|
||||||
// now get points in terrain space (effectively rounding them to boundaries)
|
// now get points in terrain space (effectively rounding them to boundaries)
|
||||||
float startXTS = startX * invFactor;
|
float startXTS = startX * invFactor;
|
||||||
|
|
Loading…
Reference in a new issue