Fix wands losing a charge even when no shot was actually fired (#4588).

This commit is contained in:
Menshin
2014-08-27 19:54:46 +02:00
parent 96cf5cdedd
commit bdca196312
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -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
+5 -1
View File
@@ -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()