From 612130927b2f4a5764b10a9860a84b115fca4460 Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Sun, 22 Dec 2019 02:46:48 +0000 Subject: [PATCH] Fix reversed boolean check for map memory cache --- src/cata_tiles.cpp | 8 ++++---- src/map.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cata_tiles.cpp b/src/cata_tiles.cpp index 1d47d43202dcb..8a0e5bda026a5 100644 --- a/src/cata_tiles.cpp +++ b/src/cata_tiles.cpp @@ -2176,7 +2176,7 @@ bool cata_tiles::draw_terrain( const tripoint &p, const lit_level ll, int &heigh // do something to get other terrain orientation values } const std::string &tname = t.id().str(); - if( !g->m.check_and_set_seen_cache( p ) ) { + if( g->m.check_and_set_seen_cache( p ) ) { g->u.memorize_tile( g->m.getabs( p ), tname, subtile, rotation ); } // draw the actual terrain if there's no override @@ -2340,7 +2340,7 @@ bool cata_tiles::draw_furniture( const tripoint &p, const lit_level ll, int &hei int rotation = 0; get_tile_values( f, neighborhood, subtile, rotation ); const std::string &fname = f.id().str(); - if( !g->m.check_and_set_seen_cache( p ) ) { + if( g->m.check_and_set_seen_cache( p ) ) { g->u.memorize_tile( g->m.getabs( p ), fname, subtile, rotation ); } // draw the actual furniture if there's no override @@ -2414,7 +2414,7 @@ bool cata_tiles::draw_trap( const tripoint &p, const lit_level ll, int &height_3 int rotation = 0; get_tile_values( tr, neighborhood, subtile, rotation ); const std::string trname = tr.id().str(); - if( !g->m.check_and_set_seen_cache( p ) ) { + if( g->m.check_and_set_seen_cache( p ) ) { g->u.memorize_tile( g->m.getabs( p ), trname, subtile, rotation ); } // draw the actual trap if there's no override @@ -2580,7 +2580,7 @@ bool cata_tiles::draw_vpart( const tripoint &p, lit_level ll, int &height_3d, const int rotation = veh.face.dir(); const std::string vpname = "vp_" + vp_id.str(); if( !veh.forward_velocity() && !veh.player_in_control( g->u ) && - !g->m.check_and_set_seen_cache( p ) ) { + g->m.check_and_set_seen_cache( p ) ) { g->u.memorize_tile( g->m.getabs( p ), vpname, subtile, rotation ); } if( !overridden ) { diff --git a/src/map.cpp b/src/map.cpp index bb7a51c724f4e..3ed741cfb49b3 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -5730,7 +5730,7 @@ bool map::draw_maptile( const catacurses::window &w, const player &u, const trip } } - if( !check_and_set_seen_cache( p ) ) { + if( check_and_set_seen_cache( p ) ) { g->u.memorize_symbol( getabs( p ), memory_sym ); }