Mercurial > hg > early-roguelike
comparison rogue5/rogue.h @ 227:696277507a2e
Rogue V4, V5: disable a cheat granting permanent monster detection.
In these two games, a potion of monster detection turns on the player's
SEEMONST flag. A fuse is set to call turn_see() to turn the flag back
off. But the save and restore functions do not recognize turn_see() and
fail to set the fuse up again.
When restoring, Rogue V4 merely sets the fuse's function to NULL and
leaves it burning. When it goes off, a segfault results. Rogue V5
clears all the fuse's fields, and the player retains the ability to see
all monsters on the level.
The save and restore code can now handle the fuse. The function used is
a new wrapper, turn_see_off(), which should lead to less problems with
daemons being multiple incompatible types.
Also, Rogue V4 and Super-Rogue now properly clear unrecognized daemon
and fuse slots when restoring a saved game.
author | John "Elwin" Edwards |
---|---|
date | Sat, 05 Mar 2016 12:10:20 -0500 |
parents | 655c317b6237 |
children |
comparison
equal
deleted
inserted
replaced
226:b922f66acf4d | 227:696277507a2e |
---|---|
756 void treas_room(void); | 756 void treas_room(void); |
757 int trip_ch(int y, int x, int ch); | 757 int trip_ch(int y, int x, int ch); |
758 void tstp(int ignored); | 758 void tstp(int ignored); |
759 int turn_ok(int y, int x); | 759 int turn_ok(int y, int x); |
760 int turn_see(int turn_off); | 760 int turn_see(int turn_off); |
761 void turn_see_off(void); | |
761 void turnref(void); | 762 void turnref(void); |
762 const char *type_name(int type); | 763 const char *type_name(int type); |
763 void u_level(void); | 764 void u_level(void); |
764 void unconfuse(void); | 765 void unconfuse(void); |
765 void uncurse(THING *obj); | 766 void uncurse(THING *obj); |