From 800b3b4b4b2396e70c65d7ffffc211269bb43004 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 28 May 2024 18:12:52 +0300 Subject: [PATCH] Fix swallower being in the same location as hero A monster swallowed hero, hero teleported the monster away, but the level was full of monsters, so the swallower ended up not moving anywhere, so it was in the same location as hero, but hero wasn't swallowed by it. Move the monster into limbo instead. --- src/teleport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/teleport.c b/src/teleport.c index cb3b518ec..916b1ba81 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -2164,7 +2164,8 @@ u_teleport_mon(struct monst *mtmp, boolean give_feedback) if (give_feedback) You("are no longer inside %s!", mon_nam(mtmp)); unstuck(mtmp); - (void) rloc(mtmp, RLOC_MSG); + if (!rloc(mtmp, RLOC_MSG)) + m_into_limbo(mtmp); } else if ((is_rider(mtmp->data) || control_teleport(mtmp->data)) && rn2(13) && enexto(&cc, u.ux, u.uy, mtmp->data)) rloc_to(mtmp, cc.x, cc.y);