Skip to content

Commit

Permalink
Update overmap details based on modified sight range (if any) rather …
Browse files Browse the repository at this point in the history
…than on base sight range
  • Loading branch information
Night-Pryanik committed Sep 21, 2024
1 parent a6e3f8c commit d6585bd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12691,7 +12691,6 @@ void game::update_overmap_seen()
{
const tripoint_abs_omt ompos = u.global_omt_location();
const int dist = u.overmap_modified_sight_range( light_level( u.posz() ) );
const int base_sight = u.overmap_sight_range( light_level( u.posz() ) );
const int dist_squared = dist * dist;
// We can always see where we're standing
overmap_buffer.set_seen( ompos, om_vision_level::full );
Expand Down Expand Up @@ -12728,11 +12727,11 @@ void game::update_overmap_seen()
} while( seen.z() >= 0 );
};
int tiles_from = rl_dist( p, ompos );
if( tiles_from < std::floor( base_sight / 2 ) ) {
if( tiles_from < std::floor( dist / 2 ) ) {
set_seen( p, om_vision_level::full );
} else if( tiles_from < base_sight ) {
} else if( tiles_from < dist ) {
set_seen( p, om_vision_level::details );
} else if( tiles_from < base_sight * 2 ) {
} else if( tiles_from < dist * 2 ) {
set_seen( p, om_vision_level::outlines );
} else {
set_seen( p, om_vision_level::vague );
Expand Down

0 comments on commit d6585bd

Please sign in to comment.