Skip to content

Commit

Permalink
prefire check
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Sep 6, 2024
1 parent 28371ab commit 0739e4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
var/recoil_backtime_multiplier = 2
///this is how much deviation the gun recoil can have, recoil pushes the screen towards the reverse angle you shot + some deviation which this is the max.
var/recoil_deviation = 22.5
///Used if the guns recoil is lower then the min, it clamps the highest recoil
var/min_recoil = 0
var/gunslinger_recoil_bonus = 0

Expand Down Expand Up @@ -552,6 +553,8 @@
return

/obj/item/gun/proc/pre_fire(atom/target, mob/living/user, message = TRUE, flag, params = null, zone_override = "", bonus_spread = 0, dual_wielded_gun = FALSE)
prefire_empty_checks()

add_fingerprint(user)

// If we have a cooldown, don't do anything, obviously
Expand Down
4 changes: 0 additions & 4 deletions code/modules/projectiles/guns/ballistic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@
if (last_shot_succeeded && bolt_type == BOLT_TYPE_CLIP)
update_appearance()

/obj/item/gun/ballistic/pre_fire(atom/target, mob/living/user, message = TRUE, flag, params = null, zone_override = "", bonus_spread = 0, dual_wielded_gun = FALSE)
prefire_empty_checks()
return ..()

/obj/item/gun/ballistic/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0, burst_firing = FALSE, spread_override = 0, iteration = 0)
. = ..() //The gun actually firing
postfire_empty_checks(.)
Expand Down

0 comments on commit 0739e4b

Please sign in to comment.