From 36a680b93e5824d1d9415b99bb402ff77751cbdc Mon Sep 17 00:00:00 2001 From: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com> Date: Tue, 26 Apr 2022 15:36:05 -0400 Subject: [PATCH] Prevent bullets from sometimes missing if blocked by another person diagonally (#66276) --- code/modules/projectiles/ammunition/_firing.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/projectiles/ammunition/_firing.dm b/code/modules/projectiles/ammunition/_firing.dm index ddd533c30d2..7b77347998e 100644 --- a/code/modules/projectiles/ammunition/_firing.dm +++ b/code/modules/projectiles/ammunition/_firing.dm @@ -71,9 +71,8 @@ new firing_effect_type(get_turf(src), firing_dir) var/direct_target - if(targloc == curloc) - if(target) //if the target is right on our location we'll skip the travelling code in the proj's fire() - direct_target = target + if(target && curloc.Adjacent(targloc, target=targloc, mover=src)) //if the target is right on our location or adjacent (including diagonally if reachable) we'll skip the travelling code in the proj's fire() + direct_target = target if(!direct_target) var/modifiers = params2list(params) loaded_projectile.preparePixelProjectile(target, fired_from, modifiers, spread)