Skip to content

Commit

Permalink
Fix nullspaced closet runtime (#4964)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zonespace27 authored Nov 28, 2023
1 parent c8d3a20 commit f86e473
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,15 @@


/obj/structure/closet/proc/take_damage(damage)
if(health <= 0)
return

health = max(health - damage, 0)
if(health <= 0)
for(var/atom/movable/A as anything in src)
A.forceMove(src.loc)
for(var/atom/movable/movable as anything in src)
if(!loc)
break
movable.forceMove(loc)
playsound(loc, 'sound/effects/meteorimpact.ogg', 25, 1)
qdel(src)

Expand Down

0 comments on commit f86e473

Please sign in to comment.