From bb776ac90b7cd8aadf03280edee0229c7fe619a8 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Wed, 14 Aug 2024 13:26:45 +0300 Subject: [PATCH] Fixed bileworms not having a deaggro range (#85719) ## About The Pull Request Closes #69244 Bileworms use standard 9 tiles of vision but also have the ignore_sight flag, which prevents can_see check from running. Check, which is the only place where deaggro range check exists. Vision range may need bumping up based on player feedback if they seem to be deaggroing too easily due to slow movement speed now that they actually do so ## Changelog :cl: fix: Fixed bileworms not having a deaggro range /:cl: --- .../targeting_strategies/basic_targeting_strategy.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/datums/ai/basic_mobs/targeting_strategies/basic_targeting_strategy.dm b/code/datums/ai/basic_mobs/targeting_strategies/basic_targeting_strategy.dm index 2394f2a3862..320e6abf0be 100644 --- a/code/datums/ai/basic_mobs/targeting_strategies/basic_targeting_strategy.dm +++ b/code/datums/ai/basic_mobs/targeting_strategies/basic_targeting_strategy.dm @@ -29,6 +29,9 @@ if(M.status_flags & GODMODE) return FALSE + if (vision_range && get_dist(living_mob, the_target) > vision_range) + return FALSE + if(!ignore_sight && !can_see(living_mob, the_target, vision_range)) //Target has moved behind cover and we have lost line of sight to it return FALSE