View Single Post
Old November 1, 2011, 12:42   #1
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,750
PowerWyrm is on a distinguished road
[3.3.x] Cannot suicide characters

The suicide command doesn't work in 3.3.x due to the fact that keypresses were changed to a structure: "code" + "mods".

Code:
		/* Special Verification for suicide */
		prt("Please verify SUICIDE by typing the '@' sign: ", 0, 0);
		flush();
		ch = inkey();
		prt("", 0, 0);
		if (ch.code != '@') return;
In this case, struct keypress ch is filled with code = '0' and mods = KC_MOD_CONTROL + KC_MOD_ALT. The check should be more explicite.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote