Skip to content

Commit

Permalink
Revert "sees checks outside of max view distance always fail (CleverR…
Browse files Browse the repository at this point in the history
…aven#69916)"

This reverts commit d9741cd.
  • Loading branch information
andrei8l authored and GuardianDll committed Dec 7, 2023
1 parent 2afb1eb commit 88a7d82
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/lightmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,17 +789,12 @@ bool tinymap::pl_sees( const tripoint &, int ) const

bool map::pl_sees( const tripoint &t, const int max_range ) const
{
Character &player_character = get_player_character();

if( square_dist( t, player_character.pos() ) > MAX_VIEW_DISTANCE ) {
return false;
}

if( !inbounds( t ) ) {
return false;
}

const level_cache &map_cache = get_cache_ref( t.z );
Character &player_character = get_player_character();
if( max_range >= 0 && square_dist( t, player_character.pos() ) > max_range &&
map_cache.camera_cache[t.x][t.y] == 0 ) {
return false; // Out of range!
Expand Down

0 comments on commit 88a7d82

Please sign in to comment.