Skip to content

Commit

Permalink
/atom/movable/Destroy() now gets loc at the beginning of the proc (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
chuga-git authored Aug 23, 2024
1 parent 00b21f9 commit f0c88db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,23 @@
add_overlay(list(em_block))

/atom/movable/Destroy()
var/turf/T = loc
unbuckle_all_mobs(force = TRUE)
QDEL_NULL(em_block)

. = ..()

if(loc)
loc.handle_atom_del(src)

for(var/atom/movable/AM in contents)
qdel(AM)

LAZYCLEARLIST(client_mobs_in_contents)
loc = null
if(pulledby)
pulledby.stop_pulling()

var/turf/T = loc
if(opacity && istype(T))
var/old_has_opaque_atom = T.has_opaque_atom
T.recalc_atom_opacity()
Expand Down

0 comments on commit f0c88db

Please sign in to comment.