Merge pull request #4473 from Citadel-Station-13/upstream-merge-33672

[MIRROR] Fixes bullets making sounds in space and water
This commit is contained in:
LetterJay
2017-12-21 04:55:16 -06:00
committed by GitHub
8 changed files with 55 additions and 11 deletions
+2 -4
View File
@@ -31,8 +31,7 @@
if(istype(AC)) //there's a chambered round
if(casing_ejector)
AC.forceMove(drop_location()) //Eject casing onto ground.
AC.SpinAnimation(10, 1) //next gen special effects
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, AC, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
AC.bounce_away(TRUE)
chambered = null
else if(empty_chamber)
chambered = null
@@ -125,8 +124,7 @@
to_chat(user, "<span class='notice'>You pull the magazine out of \the [src].</span>")
else if(chambered)
AC.forceMove(drop_location())
AC.SpinAnimation(10, 1)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, AC, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
AC.bounce_away()
chambered = null
to_chat(user, "<span class='notice'>You unload the round from \the [src]'s chamber.</span>")
playsound(src, "gun_slide_lock", 70, 1)
@@ -40,9 +40,7 @@
CB = magazine.get_round(0)
if(CB)
CB.forceMove(drop_location())
CB.SpinAnimation(10, 1)
CB.update_icon()
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, CB, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
CB.bounce_away(FALSE, NONE)
num_unloaded++
if (num_unloaded)
to_chat(user, "<span class='notice'>You unload [num_unloaded] shell\s from [src].</span>")
@@ -57,8 +57,7 @@
/obj/item/gun/ballistic/shotgun/proc/pump_unload(mob/M)
if(chambered)//We have a shell in the chamber
chambered.forceMove(drop_location())//Eject casing
chambered.SpinAnimation(10, 1)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, chambered, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
chambered.bounce_away()
chambered = null
/obj/item/gun/ballistic/shotgun/proc/pump_reload(mob/M)