Skip to content

Commit

Permalink
Merge pull request #36338 from kevingranade/fix-map-memory-cache-logic
Browse files Browse the repository at this point in the history
Fix reversed boolean check for map memory cache
  • Loading branch information
ZhilkinSerg authored Dec 22, 2019
2 parents fdee8ef + 6121309 commit 063bc5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/cata_tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand Down

0 comments on commit 063bc5e

Please sign in to comment.