Skip to content

Commit

Permalink
Fixes deleted mobs not unbuckling
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Oct 18, 2023
1 parent bf7f1ef commit 45fb154
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,14 @@
/obj/proc/afterbuckle(mob/M as mob) // Called after somebody buckled / unbuckled
handle_rotation()
SEND_SIGNAL(src, COSMIG_OBJ_AFTER_BUCKLE, buckled_mob)
if(!buckled_mob)
UnregisterSignal(M, COMSIG_PARENT_QDELETING)
else
RegisterSignal(buckled_mob, COMSIG_PARENT_QDELETING, PROC_REF(unbuckle))
return buckled_mob

/obj/proc/unbuckle()
SIGNAL_HANDLER
if(buckled_mob && buckled_mob.buckled == src)
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
Expand Down

0 comments on commit 45fb154

Please sign in to comment.