more zapping while hiding-under

The previous commit had the up/down test backward.  Also the commit
log text described the old behavior incorrectly:  zapping down while
hiding-under skipped the top item but zapping up hit the whole pile.

Still not adequately tested.
This commit is contained in:
PatR
2022-12-10 18:00:44 -08:00
parent 0e1f1c653b
commit 608490ad98

View File

@@ -2305,11 +2305,11 @@ bhitpile(
if (hidingunder) {
if (first) {
first = FALSE; /* reset for next item */
if (zz < 0) /* down when hiding-under skips first item */
if (zz > 0) /* down when hiding-under skips first item */
continue;
} else {
/* !first */
if (zz > 0) /* up when hiding-under skips rest of pile */
if (zz < 0) /* up when hiding-under skips rest of pile */
continue;
}
}