From: nethack.rankin Date: Wed, 16 May 2012 01:47:18 +0000 (+0000) Subject: fix #H2588 - turn order alternation bug X-Git-Tag: MOVE2GIT~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c4e3248565da0fd167c49c8c1ad84d513a867db;p=nethack fix #H2588 - turn order alternation bug From a bug report, when the hero has precisely 24 movement points, fast monsters will move twice and then the hero will move twice, instead of being interleaved. The hero will get 24 additonal movement points approximately one turn out of three when wearing speed boots (or when using spell of haste self or potion of speed) and can also get 18 additional points twice in succession, with a net of 24 after 12 of them are used on the first turn. But hero might not be starting at zero at the time, so I'm not sure how often this is actually noticeable. He apparently got a report about this for and had some user-contributed instrumentation in place that made it easier to replicate. This fix is the one he suggested. --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 1d52652e6..74fa5f47b 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -840,6 +840,8 @@ declining to attack a peaceful monster via movement used up nutrition even declining to attack a peaceful monster via kicking woke nearby monsters and scuffed engraving at hero's location even though no action took place make hero be immune from stinking cloud damage during successful prayer +very fast hero would sometimes take two consecutive moves with very fast + monsters then getting two moves, instead of interleaving the activity Platform- and/or Interface-Specific Fixes diff --git a/src/allmain.c b/src/allmain.c index 8744323b2..1742a302c 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -97,7 +97,7 @@ boolean resuming; context.mon_moving = TRUE; do { monscanmove = movemon(); - if (youmonst.movement > NORMAL_SPEED) + if (youmonst.movement >= NORMAL_SPEED) break; /* it's now your turn */ } while (monscanmove); context.mon_moving = FALSE;