mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 13:09:11 +01:00
Fixes swarm enemies behaving like walls when dead (#17312)
* fimx.. * Scuffed swarm handling
This commit is contained in:
@@ -125,7 +125,7 @@
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
/mob/living/simple_mob/animal/giant_spider/CanPass(atom/movable/mover, turf/target)
|
||||
if(isliving(mover) && !istype(mover, /mob/living/simple_mob/animal/giant_spider) && mover.density == TRUE)
|
||||
if(isliving(mover) && !istype(mover, /mob/living/simple_mob/animal/giant_spider) && mover.density == TRUE && stat != DEAD)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
// This is so carps can swarm
|
||||
/mob/living/simple_mob/animal/space/carp/CanPass(atom/movable/mover, turf/target)
|
||||
if(isliving(mover) && !istype(mover, /mob/living/simple_mob/animal/space/carp) && mover.density == TRUE)
|
||||
if(isliving(mover) && !istype(mover, /mob/living/simple_mob/animal/space/carp) && mover.density == TRUE && stat != DEAD)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -554,6 +554,10 @@
|
||||
else
|
||||
var/mob/living/L = target
|
||||
if(!direct_target)
|
||||
// Swarms are special scuffed critters. They must have density FALSE to swarm, but then they don't get hit.
|
||||
// So we'll check before, just in case. Lying might gives a chance to dodge, however.
|
||||
if(L.GetComponent(/datum/component/swarming) && L.stat != DEAD && !L.lying)
|
||||
return TRUE
|
||||
if(!L.density)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user