comparison srogue/state.c @ 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 94a0d9dd5ce1
children b49d8b963df3
comparison
equal deleted inserted replaced
226:b922f66acf4d 227:696277507a2e
1096 case 17: d_list[i].d_func = status; 1096 case 17: d_list[i].d_func = status;
1097 break; 1097 break;
1098 default: d_list[i].d_func = NULL; 1098 default: d_list[i].d_func = NULL;
1099 break; 1099 break;
1100 } 1100 }
1101
1102 if (d_list[i].d_func == NULL)
1103 {
1104 d_list[i].d_type = 0;
1105 d_list[i].d_arg = 0;
1106 d_list[i].d_time = 0;
1107 }
1101 } 1108 }
1102 } 1109 }
1103 } 1110 }
1104 } 1111 }
1105 1112