From 714bad8c3c7d45b31a08f4898ef698c2c9c0dc90 Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Wed, 20 Jul 2016 20:44:41 -0400 Subject: [PATCH] Rogue V5: fix save/restore making levitation, hallucination permanent. Like an earlier bug with detecting monsters, the fuses responsible for ending levitation and hallucination were not recognized by rs_write_daemons(). They got left out of the savefile, so after restoring, the effect never wore off. I think this is the first bugfix I've ever made that reduced the game's difficulty. --- rogue5/state.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rogue5/state.c b/rogue5/state.c index 0895f61..a26afb5 100644 --- a/rogue5/state.c +++ b/rogue5/state.c @@ -600,6 +600,12 @@ rs_write_daemons(FILE *savef, struct delayed_action *dlist, int cnt) func = 9; else if (dlist[i].d_func == turn_see_off) func = 10; + else if (dlist[i].d_func == land) + func = 11; + else if (dlist[i].d_func == come_down) + func = 12; + else if (dlist[i].d_func == visuals) + func = 13; else if (dlist[i].d_func == NULL) func = 0; else @@ -661,6 +667,12 @@ rs_read_daemons(FILE *savef, struct delayed_action *dlist, int cnt) break; case 10: dlist[i].d_func = turn_see_off; break; + case 11: dlist[i].d_func = land; + break; + case 12: dlist[i].d_func = come_down; + break; + case 13: dlist[i].d_func = visuals; + break; default:dlist[i].d_func = NULL; break; }