From 0b2283c5613fef0bf1a9d82e2f007f27894118d8 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 20 Mar 2022 20:47:33 -0400 Subject: floor renders change much less when lamp drop should prevent spamming to get signs --- src/game.cpp | 6 ++++-- 1 file 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() { { if (map.at(x,y).dirtyRender) { map.at(x,y).dirtyRender = false; - map.at(x,y).renderId = -1; - if (map.tile(x,y) == Tile::Floor) { + if (map.tile(x,y) == Tile::Floor && (!map.at(x,y).lit || !map.at(x,y).wasLit)) { int renderDesc = 0; if (isTileSetOrNotLit(map, x-1, y-1)) renderDesc |= (1 << 7); if (isTileSetOrNotLit(map, x , y-1)) renderDesc |= (1 << 6); @@ -383,6 +382,7 @@ void Game::recalculateRender() { } } else { map.at(x,y).sign = false; + map.at(x,y).renderId = -1; } } else if (map.tile(x,y) == Tile::Wall) { static bool initWalls = false; @@ -475,6 +475,8 @@ void Game::recalculateRender() { std::cout << ((renderDesc & (1 << 3)) ? 'X' : 'O'); std::cout << std::endl;*/ } + } else { + map.at(x,y).renderId = -1; } } } -- cgit 1.4.1