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.
This commit is contained in:
John "Elwin" Edwards 2016-07-20 20:44:41 -04:00
parent eabbd3e1a1
commit 714bad8c3c

View file

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