Skip to content

Commit

Permalink
Merge pull request #75641 from HadeanLake/HadeanLake/Cataclysm-DDA
Browse files Browse the repository at this point in the history
Reading maps will reveal previously partially revealed tiles
  • Loading branch information
akrieger authored Aug 13, 2024
2 parents 4f6e750 + dd7b939 commit 1adf3ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/iuse_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ void reveal_map_actor::reveal_targets( const tripoint_abs_omt &center,
const auto places = overmap_buffer.find_all( center, target.first, radius, false,
target.second );
for( const tripoint_abs_omt &place : places ) {
if( overmap_buffer.seen( place ) == om_vision_level::unseen ) {
if( overmap_buffer.seen( place ) != om_vision_level::full ) {
// Should be replaced with the character using the item passed as an argument if NPCs ever learn to use maps
get_avatar().map_revealed_omts.emplace( place );
}
Expand Down
2 changes: 1 addition & 1 deletion src/overmapbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ bool overmapbuffer::reveal( const tripoint_abs_omt &center, int radius,
for( int i = -radius; i <= radius; i++ ) {
for( int j = -radius; j <= radius; j++ ) {
const tripoint_abs_omt p = center + point( i, j );
if( seen( p ) != om_vision_level::unseen ) {
if( seen( p ) == om_vision_level::full ) {
continue;
}
if( trigdist && i * i + j * j > radius_squared ) {
Expand Down

0 comments on commit 1adf3ef

Please sign in to comment.