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 <some variant> and had some
user-contributed instrumentation in place that made it easier to replicate.
This fix is the one he suggested.
This commit is contained in:
nethack.rankin
2012-05-16 01:47:18 +00:00
parent 18dfc82175
commit 8c4e324856
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -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;