[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 02:48:48 -07:00
committed by kevinz000
parent 95a9942bdc
commit 773ba43974
2 changed files with 11 additions and 2 deletions
+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()