unconsciousness (trunk only)
When testing armor theft by nymph I got a message "you dream that you hear <something or other>" even though I was awake. steal() was leaving nomovemsg null in order to get the default of "you can move again", but unconscious() was treating null value as 'yes, hero is unconscious'. I'm pretty sure its intent was just to guard against passing null to strncmpi() and didn't really mean that null indicates unconsciousness.
This commit is contained in:
10
src/trap.c
10
src/trap.c
@@ -4665,11 +4665,11 @@ boolean nocorpse;
|
||||
boolean
|
||||
unconscious()
|
||||
{
|
||||
return((boolean)(multi < 0 && (!nomovemsg ||
|
||||
u.usleep ||
|
||||
!strncmp(nomovemsg,"You awake", 9) ||
|
||||
!strncmp(nomovemsg,"You regain con", 14) ||
|
||||
!strncmp(nomovemsg,"You are consci", 14))));
|
||||
return (boolean)(multi < 0 &&
|
||||
(u.usleep || (nomovemsg &&
|
||||
(!strncmp(nomovemsg, "You awake", 9) ||
|
||||
!strncmp(nomovemsg, "You regain con", 14) ||
|
||||
!strncmp(nomovemsg, "You are consci", 14)))));
|
||||
}
|
||||
|
||||
static const char lava_killer[] = "molten lava";
|
||||
|
||||
Reference in New Issue
Block a user