diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index eba77d57446..be7ecd1a95d 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -271,7 +271,8 @@ /obj/item/gun/afterattack(atom/target, mob/living/user, flag, params) ..() - return fire_gun(target, user, flag, params) | AFTERATTACK_PROCESSED_ITEM + fire_gun(target, user, flag, params) + return AFTERATTACK_PROCESSED_ITEM /obj/item/gun/proc/fire_gun(atom/target, mob/living/user, flag, params) if(QDELETED(target)) @@ -403,6 +404,7 @@ update_appearance() return TRUE +///returns true if the gun successfully fires /obj/item/gun/proc/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0) var/base_bonus_spread = 0 if(user) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 52ab71e4cea..d7e2d16a9b0 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -490,11 +490,11 @@ if (empty_alarm && last_shot_succeeded) playsound(src, empty_alarm_sound, empty_alarm_volume, empty_alarm_vary) update_appearance() - if (last_shot_succeeded && bolt_type == BOLT_TYPE_LOCKING) + if (last_shot_succeeded && bolt_type == BOLT_TYPE_LOCKING && semi_auto) bolt_locked = TRUE update_appearance() -/obj/item/gun/ballistic/afterattack() +/obj/item/gun/ballistic/fire_gun(atom/target, mob/living/user, flag, params) prefire_empty_checks() . = ..() //The gun actually firing postfire_empty_checks(.)