[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:
committed by
kevinz000
parent
95a9942bdc
commit
773ba43974
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user