From fbee8b6c35e3bf55ad02c30f354bd42b2c245a1b Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 15 Mar 2022 12:13:45 -0400 Subject: lit tiles in unloaded chunk should count toward total lit tiles for zooming --- src/game.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index e9a9fbe..7c67daa 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -119,11 +119,7 @@ void Game::tick(bool onlyDark) bool Game::movePlayer(int x, int y) { - if (/*x >= curBoundX && - y >= curBoundY && - x < curBoundX + curZoom * ZOOM_X_FACTOR && - y < curBoundY + curZoom * ZOOM_Y_FACTOR &&*/ - map.at(x,y).tile == Tile::Floor) + if (map.at(x,y).tile == Tile::Floor) { if (map.at(player_x, player_y).tile == Tile::Floor) { @@ -249,6 +245,7 @@ void Game::recalculateLighting() } } + litSpots += map.getUnloadedLitTiles(); dirtyLighting = false; } -- cgit 1.4.1