Fix #20134: Don't update grass length outside of the actual map

This commit is contained in:
ζeh Matt committed 2023-05-06 18:25:27 +03:00
1 parent 936f017147
commit cc1eee5bee
1 file changed
+3
+3
View File
@@ -1335,6 +1335,9 @@ void MapUpdateTiles()
for (int32_t blockX = 0; blockX < gMapSize.x; blockX += 256)
{
auto mapPos = TileCoordsXY{ blockX + x, blockY + y }.ToCoordsXY();
if (MapIsEdge(mapPos))
continue;
auto* surfaceElement = MapGetSurfaceElementAt(mapPos);
if (surfaceElement != nullptr)
{