From 1b34a48d0ccdae37e5584273452a60c0e8490c02 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 15 Dec 2005 04:20:23 +0000 Subject: [PATCH] levitation timeout Forwarded from the newsgroup by Michael: giving a count before '.' to rest many turns wouldn't be interrupted by having levitation end (despite autopickup taking place at the time, which is what the thread is about but not all that relevant to this particular issue). Stopping counted activity is easy, so that's all I've done. Stopping a timed occupation would be a lot harder due to message sequencing; I'm not going to attempt it. --- doc/fixes34.4 | 1 + src/trap.c | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 87b403319..c015e96d7 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -169,6 +169,7 @@ tame flaming spheres and shocking spheres shouldn't pick up items can hear the opening or closing of an unseen drawbridge prevent "object lost" panic caused by accessing freed memory after worn non-fireproof water walking boots are destroyed by lava +stop multi-turn running, searching, or resting early if levitation ends Platform- and/or Interface-Specific Fixes diff --git a/src/trap.c b/src/trap.c index 3eef5a183..019505229 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2423,6 +2423,7 @@ long hmask, emask; /* might cancel timeout */ HLevitation &= ~hmask; ELevitation &= ~emask; if(Levitation) return(0); /* maybe another ring/potion/boots */ + nomul(0); /* stop running or resting */ if(u.uswallow) { You("float down, but you are still %s.", is_animal(u.ustuck->data) ? "swallowed" : "engulfed"); -- 2.40.0