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:
+2
-2
@@ -18,7 +18,7 @@ char *outbuf;
|
||||
/* a random engraving may come from the "rumors" file,
|
||||
or from the "engrave" file (formerly in an array here) */
|
||||
if (!rn2(4) || !(rumor = getrumor(0, outbuf, TRUE)) || !*rumor)
|
||||
(void) get_rnd_text(ENGRAVEFILE, outbuf);
|
||||
(void) get_rnd_text(ENGRAVEFILE, outbuf, rn2);
|
||||
|
||||
wipeout_text(outbuf, (int) (strlen(outbuf) / 4), 0);
|
||||
return outbuf;
|
||||
@@ -1294,7 +1294,7 @@ const char *str;
|
||||
/* Engrave the headstone */
|
||||
del_engr_at(x, y);
|
||||
if (!str)
|
||||
str = get_rnd_text(EPITAPHFILE, buf);
|
||||
str = get_rnd_text(EPITAPHFILE, buf, rn2);
|
||||
make_engr_at(x, y, str, 0L, HEADSTONE);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user