Skip to content

Commit

Permalink
Fix some logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhilkinSerg committed Dec 23, 2019
1 parent b128e6b commit 8ac34ff
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/cata_tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2218,6 +2218,9 @@ bool cata_tiles::draw_terrain( const tripoint &p, const lit_level ll, int &heigh

bool cata_tiles::has_memory_at( const tripoint &p, const map_memory_layer &layer ) const
{
if( !g->u.should_show_map_memory() ) {
return false;
}
if( layer == map_memory_layer::num_map_memory_layer ) {
for( int i = 0; i < static_cast<int>( map_memory_layer::num_map_memory_layer ); i++ ) {
if( !g->u.get_memorized_tile( g->m.getabs( p ),
Expand All @@ -2232,10 +2235,10 @@ bool cata_tiles::has_memory_at( const tripoint &p, const map_memory_layer &layer

map_memory_tile cata_tiles::get_memory_at( const tripoint &p, const map_memory_layer &layer ) const
{
if( g->u.should_show_map_memory() ) {
return g->u.get_memorized_tile( g->m.getabs( p ), layer );
if( !g->u.should_show_map_memory() ) {
return {};
}
return {};
return g->u.get_memorized_tile( g->m.getabs( p ), layer );
}

bool cata_tiles::draw_furniture( const tripoint &p, const lit_level ll, int &height_3d,
Expand Down

0 comments on commit 8ac34ff

Please sign in to comment.