diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-20 20:47:33 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-20 20:47:33 -0400 |
commit | 0b2283c5613fef0bf1a9d82e2f007f27894118d8 (patch) | |
tree | 777a148a86c89fb0adee736de64744c87486e425 | |
parent | 6cb4164c911d04fdb3c1da1d91296a1059f67635 (diff) | |
download | ether-0b2283c5613fef0bf1a9d82e2f007f27894118d8.tar.gz ether-0b2283c5613fef0bf1a9d82e2f007f27894118d8.tar.bz2 ether-0b2283c5613fef0bf1a9d82e2f007f27894118d8.zip |
floor renders change much less when lamp drop
should prevent spamming to get signs
-rw-r--r-- | src/game.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index ca1f0f3..175b817 100644 --- a/src/game.cpp +++ b/src/game.cpp | |||
@@ -351,9 +351,8 @@ void Game::recalculateRender() { | |||
351 | { | 351 | { |
352 | if (map.at(x,y).dirtyRender) { | 352 | if (map.at(x,y).dirtyRender) { |
353 | map.at(x,y).dirtyRender = false; | 353 | map.at(x,y).dirtyRender = false; |
354 | map.at(x,y).renderId = -1; | ||
355 | 354 | ||
356 | if (map.tile(x,y) == Tile::Floor) { | 355 | if (map.tile(x,y) == Tile::Floor && (!map.at(x,y).lit || !map.at(x,y).wasLit)) { |
357 | int renderDesc = 0; | 356 | int renderDesc = 0; |
358 | if (isTileSetOrNotLit(map, x-1, y-1)) renderDesc |= (1 << 7); | 357 | if (isTileSetOrNotLit(map, x-1, y-1)) renderDesc |= (1 << 7); |
359 | if (isTileSetOrNotLit(map, x , y-1)) renderDesc |= (1 << 6); | 358 | if (isTileSetOrNotLit(map, x , y-1)) renderDesc |= (1 << 6); |
@@ -383,6 +382,7 @@ void Game::recalculateRender() { | |||
383 | } | 382 | } |
384 | } else { | 383 | } else { |
385 | map.at(x,y).sign = false; | 384 | map.at(x,y).sign = false; |
385 | map.at(x,y).renderId = -1; | ||
386 | } | 386 | } |
387 | } else if (map.tile(x,y) == Tile::Wall) { | 387 | } else if (map.tile(x,y) == Tile::Wall) { |
388 | static bool initWalls = false; | 388 | static bool initWalls = false; |
@@ -475,6 +475,8 @@ void Game::recalculateRender() { | |||
475 | std::cout << ((renderDesc & (1 << 3)) ? 'X' : 'O'); | 475 | std::cout << ((renderDesc & (1 << 3)) ? 'X' : 'O'); |
476 | std::cout << std::endl;*/ | 476 | std::cout << std::endl;*/ |
477 | } | 477 | } |
478 | } else { | ||
479 | map.at(x,y).renderId = -1; | ||
478 | } | 480 | } |
479 | } | 481 | } |
480 | } | 482 | } |