Don't advance the main RNG during hallucination

This is based on the multiple-RNGs code fron NetHack4, but using
only the parts relevant to the display RNG (and with substantial
changes, both because of post-3.4.3 changes, and because Nethack4's
display code is based on Slash'EM's rather than NetHack's).
This commit is contained in:
Alex Smith
2019-01-28 04:45:26 +00:00
parent 1083971228
commit ce5184c3da
21 changed files with 150 additions and 93 deletions

View File

@@ -457,13 +457,14 @@ boolean use_detection_glyph;
struct wseg *curr = wtails[worm->wormno];
/* if (!mtmp->wormno) return; bullet proofing */
int what_tail = what_mon(PM_LONG_WORM_TAIL, newsym_rn2);
while (curr != wheads[worm->wormno]) {
num = use_detection_glyph
? detected_monnum_to_glyph(what_mon(PM_LONG_WORM_TAIL))
? detected_monnum_to_glyph(what_tail)
: (worm->mtame
? petnum_to_glyph(what_mon(PM_LONG_WORM_TAIL))
: monnum_to_glyph(what_mon(PM_LONG_WORM_TAIL)));
? petnum_to_glyph(what_tail)
: monnum_to_glyph(what_tail));
show_glyph(curr->wx, curr->wy, num);
curr = curr->nseg;
}