From: PatR Date: Mon, 28 Dec 2015 23:10:22 +0000 (-0800) Subject: occupation vs running X-Git-Tag: NetHack-3.6.1_RC01~1099 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a05826d06d810dc56afa45c534626f4fba281f87;p=nethack occupation vs running Noticed while testing a potential change to running while confused: when confusion timed out, I kept running even though I was headed in the wrong direction. Timeout calls stop_occupation() but running is not an occupation. Make stop_occupation() also stop counted activity under control of the player (ie, multi > 0). Some places in the code use both stop_occuation() and nomul(0), some just use one or the other. But most of those probably intend for both. --- diff --git a/src/allmain.c b/src/allmain.c index 02fa6480f..9f4329143 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 allmain.c $NHDT-Date: 1450231173 2015/12/16 01:59:33 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.67 $ */ +/* NetHack 3.6 allmain.c $NHDT-Date: 1451344214 2015/12/28 23:10:14 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.68 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -296,10 +296,7 @@ boolean resuming; change = 2; if (change && !Unchanging) { if (multi >= 0) { - if (occupation) - stop_occupation(); - else - nomul(0); + stop_occupation(); if (change == 1) polyself(0); else @@ -491,6 +488,8 @@ stop_occupation() context.botl = 1; /* in case u.uhs changed */ nomul(0); pushch(0); + } else if (multi >= 0) { + nomul(0); } }