Merge pull request #2395 from Citadel-Station-13/upstream-merge-29937
[MIRROR] [s] Fixes MG turret firing while the user is stunned/cuffed/unconscious
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user