]> granicus.if.org Git - nethack/commitdiff
redundant "you finish disrobing" messages
authornethack.rankin <nethack.rankin>
Fri, 21 Nov 2003 08:08:49 +0000 (08:08 +0000)
committernethack.rankin <nethack.rankin>
Fri, 21 Nov 2003 08:08:49 +0000 (08:08 +0000)
     Just From a bug report:  getting interrupted and then
resuming would sometimes produce two instances of the "You finish" message
(and evidently consumed an extra turn in the process).  I think this is
an old problem and that it's just coincidence that it showed up right after
the patch dealing with avoidance of stale context for 'A'; the interruption
has to occur when there is just one turn left in removing the final item
so doesn't happen very often.

doc/fixes34.3
src/do_wear.c

index ac8898e91a959a5c5d5103992025ae33d79d1314..0b15b81d7c9434ab318406680703e2a3b19b505f 100644 (file)
@@ -91,6 +91,7 @@ trapped monster repeatedly switched between ranged and hand-to-hand weapon
 silver items such as wands avoided all the silver checks in hmon_hitmon()
 resuming an interrupted 'A' command could cause crash if pending worn item(s)
        were stolen or destroyed
+resuming interrupted 'A' sometimes ended with "You finished disrobing" twice
 when you're asleep you shouldn't "notice" monsters that have become undetected
 must be able to reach floor in order to use stethoscope on corpse or statue
 
index 628f8b84ee93fe134f755a8951a240f127a1dc12..ce6e1d6ebaa1e84fc1e349a1923013f47efc3a7d 100644 (file)
@@ -1914,6 +1914,7 @@ do_takeoff()
        return(otmp);
 }
 
+/* occupation callback for 'A' */
 STATIC_PTR
 int
 take_off()
@@ -2000,6 +2001,7 @@ take_off()
        return(1);              /* get busy */
 }
 
+/* clear saved context to avoid inappropriate resumption of interrupted 'A' */
 void
 reset_remarm()
 {
@@ -2007,7 +2009,7 @@ reset_remarm()
        context.takeoff.disrobing[0] = '\0';
 }
 
-/* the 'A' command */
+/* the 'A' command -- remove multiple worn items */
 int
 doddoremarm()
 {
@@ -2016,7 +2018,6 @@ doddoremarm()
     if (context.takeoff.what || context.takeoff.mask) {
        You("continue %s.", context.takeoff.disrobing);
        set_occupation(take_off, context.takeoff.disrobing, 0);
-       (void) take_off();
        return 0;
     } else if (!uwep && !uswapwep && !uquiver && !uamul && !ublindf &&
                !uleft && !uright && !wearing_armor()) {