Skip to content

Commit

Permalink
Merge pull request #4724 from ARF-SS13/hot-imp-on-chaingunner-action
Browse files Browse the repository at this point in the history
Fixes mob infighting not working
  • Loading branch information
Tk420634 authored Mar 25, 2024
2 parents 26b1e3c + 5cff9dd commit ce5779a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions code/modules/mob/living/simple_animal/hostile/hostile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,16 @@
if(M.status_flags & GODMODE)
return FALSE
if(!M.client)
var/client_in_range = FALSE
for(var/client/C in GLOB.clients)
if(get_dist(M, C) < SSmobs.distance_where_a_player_needs_to_be_in_for_npcs_to_fight_other_npcs)
client_in_range = TRUE
break
if(!client_in_range)
return FALSE
if(!SSmobs.debug_disable_mob_ceasefire)
var/client_in_range = FALSE
for(var/client/C in GLOB.clients)
if(!C.mob)
continue
if(get_dist(M, C.mob) < SSmobs.distance_where_a_player_needs_to_be_in_for_npcs_to_fight_other_npcs)
client_in_range = TRUE
break
if(!client_in_range)
return FALSE

if(see_invisible < the_target.invisibility)//Target's invisible to us, forget it
return FALSE
Expand Down

0 comments on commit ce5779a

Please sign in to comment.