From ba731a346b4dce48cddb5c69b58e52b516b84217 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 3 Jan 2025 17:34:24 +0200 Subject: [PATCH] Fix shop steal when teleporting your swallower Picking up a shop item and not paying it, getting swallowed by a monster, and then teleporting the monster out of the shop with you in it, the shopkeeper didn't notice the theft. But the object was not marked as paid either. Also prevent giving a message of the swallower disappearing and appearing when it was teleported. (Although now there's no message given, so something should be added ...) --- src/teleport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/teleport.c b/src/teleport.c index 422a087ac..3b3a483f1 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1643,6 +1643,7 @@ rloc_to_core( if (u.ustuck == mtmp) { if (u.uswallow) { u_on_newpos(mtmp->mx, mtmp->my); + check_special_room(FALSE); docrt(); } else if (!m_next2u(mtmp)) { unstuck(mtmp); @@ -1652,7 +1653,7 @@ rloc_to_core( maybe_unhide_at(x, y); newsym(x, y); /* update new location */ set_apparxy(mtmp); /* orient monster */ - if (domsg && (canspotmon(mtmp) || appearmsg)) { + if (domsg && (canspotmon(mtmp) || appearmsg) && (u.ustuck != mtmp)) { int du = distu(x, y), olddu; const char *next = (du <= 2) ? " next to you" : 0, /* next2u() */ *nearu = (du <= BOLT_LIM * BOLT_LIM) ? " close by" : 0;