From 83f906ad215be31ffe742a3f54368bb59f101ce4 Mon Sep 17 00:00:00 2001 From: Birdtalon Date: Wed, 10 Oct 2018 18:11:34 +0100 Subject: [PATCH] nulls load properly --- .../modules/mob/living/simple_animal/bot/mulebot.dm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 619d0316349..56660f3f6f2 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -401,9 +401,16 @@ M.layer = layer + 0.1 else //post unbuckling - load = null - M.layer = initial(M.layer) - M.pixel_y = initial(M.pixel_y) + reset_buckled_mob(M) + +/mob/living/simple_animal/bot/mulebot/post_unbuckle_mob(mob/living/M) + . = ..() + reset_buckled_mob(M) + +/mob/living/simple_animal/bot/mulebot/proc/reset_buckled_mob(mob/living/M) + load = null + M.layer = initial(M.layer) + M.pixel_y = initial(M.pixel_y) // called to unload the bot // argument is optional direction to unload