From c2d335b7da7bdc1a956b124174ec800f8cac81bb Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Wed, 16 Aug 2017 17:50:28 -0500 Subject: [PATCH] [s] Fixes MG turret firing while the user is stunned/cuffed/unconscious --- code/game/objects/structures/manned_turret.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/manned_turret.dm b/code/game/objects/structures/manned_turret.dm index 323927af77..7448aa128f 100644 --- a/code/game/objects/structures/manned_turret.dm +++ b/code/game/objects/structures/manned_turret.dm @@ -85,7 +85,7 @@ calculated_projectile_vars = calculate_projectile_angle_and_pixel_offsets(controller, C.mouseParams) /obj/machinery/manned_turret/proc/direction_track(mob/user, atom/targeted) - if(user.stat != CONSCIOUS) + if(user.incapacitated()) return setDir(get_dir(src,targeted)) user.setDir(dir) @@ -125,7 +125,7 @@ /obj/machinery/manned_turret/proc/checkfire(atom/targeted_atom, mob/user) target = targeted_atom - if(target == user || target == get_turf(src)) + if(target == user || user.incapacitated() || target == get_turf(src)) return if(world.time < cooldown) if(!warned && world.time > (cooldown - cooldown_duration + rate_of_fire*number_of_shots)) // To capture the window where one is done firing @@ -143,6 +143,8 @@ addtimer(CALLBACK(src, /obj/machinery/manned_turret/.proc/fire_helper, user), i*rate_of_fire) /obj/machinery/manned_turret/proc/fire_helper(mob/user) + if(user.incapacitated()) + return update_positioning() //REFRESH MOUSE TRACKING!! var/turf/targets_from = get_turf(src) if(QDELETED(target))