From 3f0364f9cb51cb864e55afa610c0c3eb072c531d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 28 Oct 2019 01:32:47 -0300 Subject: Tweak homstatus() to lie if Homunculus is dead --- src/emap/script_buildins.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index b801305..b897700 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -2822,7 +2822,11 @@ BUILDIN(homstatus) return true; // Return the status (0 - active; 1 - resting ; 2 - mission) - script_pushint(st,sd->hd->homunculus.vaporize); + // BUT Dead homunculus is not active (send RESTING instead) + if (!homun_alive(sd->hd)) + script_pushint(st,1); + else + script_pushint(st,sd->hd->homunculus.vaporize); return true; } -- cgit v1.2.3-70-g09d2