[MIRROR] Fixes null bullets from being fired after they're deleted (#7102)

* Fixes null bullets from being fired after they're deleted (#38437)

* Adds handle_atom_del check to if deleted bullets are equal to ammo type and chambered round.

* works for me

* Update _box_magazine.dm

* Fixes null bullets from being fired after they're deleted
This commit is contained in:
CitadelStationBot
2018-06-15 04:48:48 -05:00
committed by kevinz000
parent 95a9942bdc
commit 773ba43974
2 changed files with 11 additions and 2 deletions
@@ -131,4 +131,8 @@
var/turf_mag = get_turf(src)
for(var/obj/item/ammo in stored_ammo)
ammo.forceMove(turf_mag)
stored_ammo -= ammo
stored_ammo -= ammo
/obj/item/ammo_box/magazine/handle_atom_del(atom/A)
stored_ammo -= A
update_icon()
+6 -1
View File
@@ -348,7 +348,7 @@
var/state = "bayonet" //Generic state.
if(bayonet.icon_state in icon_states('icons/obj/guns/bayonets.dmi')) //Snowflake state?
state = bayonet.icon_state
var/icon/bayonet_icons = 'icons/obj/guns/bayonets.dmi'
var/icon/bayonet_icons = 'icons/obj/guns/bayonets.dmi'
knife_overlay = mutable_appearance(bayonet_icons, state)
knife_overlay.pixel_x = knife_x_offset
knife_overlay.pixel_y = knife_y_offset
@@ -528,3 +528,8 @@
if(zoomable)
azoom = new()
azoom.gun = src
/obj/item/gun/handle_atom_del(atom/A)
if(A == chambered)
chambered = null
update_icon()