Fixing mobs and turrets (#6444)

This commit is contained in:
Mykhailo Bykhovtsev
2019-05-13 19:15:56 +02:00
committed by Werner
parent 5bd5eea6ed
commit 71a03e3775
3 changed files with 59 additions and 8 deletions
@@ -251,9 +251,7 @@ mob/living/simple_animal/hostile/hitby(atom/movable/AM as mob|obj,var/speed = TH
return FALSE
var/target_hit = FALSE
var/flags = PASSTABLE
if(istype(projectiletype, /obj/item/projectile/beam))
flags |= (PASSGLASS|PASSGRILLE)
var/flags = ispath(projectiletype, /obj/item/projectile/beam) ? PASSTABLE|PASSGLASS|PASSGRILLE : PASSTABLE
for(var/mob/M in check_trajectory(target_mob, src, pass_flags=flags))
if(M == target_mob)
target_hit = TRUE