diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-15 12:13:45 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-15 12:13:45 -0400 |
commit | fbee8b6c35e3bf55ad02c30f354bd42b2c245a1b (patch) | |
tree | 22b7f41ad4c831b2bd15c519bed2e2ba6804f231 /src/game.cpp | |
parent | 9f2a08d3c82e6917e0cb3da00841758a2722a7bb (diff) | |
download | ether-fbee8b6c35e3bf55ad02c30f354bd42b2c245a1b.tar.gz ether-fbee8b6c35e3bf55ad02c30f354bd42b2c245a1b.tar.bz2 ether-fbee8b6c35e3bf55ad02c30f354bd42b2c245a1b.zip |
lit tiles in unloaded chunk should count toward total lit tiles for zooming
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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) | |||
119 | 119 | ||
120 | bool Game::movePlayer(int x, int y) | 120 | bool Game::movePlayer(int x, int y) |
121 | { | 121 | { |
122 | if (/*x >= curBoundX && | 122 | if (map.at(x,y).tile == Tile::Floor) |
123 | y >= curBoundY && | ||
124 | x < curBoundX + curZoom * ZOOM_X_FACTOR && | ||
125 | y < curBoundY + curZoom * ZOOM_Y_FACTOR &&*/ | ||
126 | map.at(x,y).tile == Tile::Floor) | ||
127 | { | 123 | { |
128 | if (map.at(player_x, player_y).tile == Tile::Floor) | 124 | if (map.at(player_x, player_y).tile == Tile::Floor) |
129 | { | 125 | { |
@@ -249,6 +245,7 @@ void Game::recalculateLighting() | |||
249 | } | 245 | } |
250 | } | 246 | } |
251 | 247 | ||
248 | litSpots += map.getUnloadedLitTiles(); | ||
252 | dirtyLighting = false; | 249 | dirtyLighting = false; |
253 | } | 250 | } |
254 | 251 | ||