From bdca196312810d241ee1040a877333101a8a8205 Mon Sep 17 00:00:00 2001 From: Menshin Date: Wed, 27 Aug 2014 19:54:46 +0200 Subject: [PATCH] Fix wands losing a charge even when no shot was actually fired (#4588). --- code/modules/projectiles/ammunition.dm | 2 +- code/modules/projectiles/guns/magic.dm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index be9f64f54f7..cc767928e92 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -28,7 +28,7 @@ icon_state = "[initial(icon_state)][BB ? "-live" : ""]" desc = "[initial(desc)][BB ? "" : " This one is spent"]" -/obj/item/ammo_casing/proc/newshot() //For energy weapons and shotgun shells. +/obj/item/ammo_casing/proc/newshot() //For energy weapons, shotgun shells and wands (!). if (!BB) BB = new projectile_type(src) return diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index c036dfdb2ef..f9a0be82b99 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -32,7 +32,11 @@ /obj/item/weapon/gun/magic/proc/newshot() if (charges && chambered) chambered.newshot() - charges-- + return + +/obj/item/weapon/gun/magic/process_chamber() + if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired... + charges--//... drain a charge return /obj/item/weapon/gun/magic/New()