From 3fac1e9241766cb84eee201d765d1ed1e5065ff0 Mon Sep 17 00:00:00 2001 From: andrei Date: Sun, 3 Dec 2023 06:48:00 +0200 Subject: [PATCH] Revert "sees checks outside of max view distance always fail (#69916)" This reverts commit d9741cd2c187eeca45cf50dd06aad0f36d8c3030. --- src/lightmap.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lightmap.cpp b/src/lightmap.cpp index 17caf4d09b6a2..2baf29d65caf6 100644 --- a/src/lightmap.cpp +++ b/src/lightmap.cpp @@ -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!