From: Pasi Kallinen Date: Mon, 16 Mar 2020 20:13:17 +0000 (+0200) Subject: Fix pet location inconsistency X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15019248aebf09dae0e98c5aa3eac62daf66205b;p=nethack Fix pet location inconsistency ... if the pet attacked hero or another monster by eg. swallowing them, the pet's location might've changed during that attack. Count it as movement, so return immediately. --- diff --git a/src/dogmove.c b/src/dogmove.c index a70c9c70a..57ebcb66a 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -1181,6 +1181,10 @@ int after; /* this is extra fast monster movement */ } } } + + /* pet moved when attacking */ + if (mtmp->mx != omx || mtmp->my != omy) + return 0; } }