Merge pull request #15751 from Hatterhat/vg-25163-try-2

/vg/station style recoil - screen pushback
This commit is contained in:
silicons
2022-08-06 23:17:22 -07:00
committed by GitHub
4 changed files with 23 additions and 3 deletions
+4 -1
View File
@@ -94,6 +94,9 @@
var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds
/// directional recoil multiplier
var/dir_recoil_amp = 10
/obj/item/gun/Initialize(mapload)
. = ..()
if(no_pin_required)
@@ -159,7 +162,7 @@
/obj/item/gun/proc/shoot_live_shot(mob/living/user, pointblank = FALSE, mob/pbtarget, message = 1, stam_cost = 0)
if(recoil)
shake_camera(user, recoil + 1, recoil)
directional_recoil(user, recoil*dir_recoil_amp, Get_Angle(user, pbtarget))
if(stam_cost) //CIT CHANGE - makes gun recoil cause staminaloss
var/safe_cost = clamp(stam_cost, 0, user.stamina_buffer)*(firing && burst_size >= 2 ? 1/burst_size : 1)
@@ -167,6 +167,7 @@
icon_state = "goldrevolver"
fire_sound = 'sound/weapons/resonator_blast.ogg'
recoil = 8
dir_recoil_amp = 5 // 40 directional recoil is already really funny
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/revolver/nagant