X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=main.c;h=6d904f297734fe78e1f27d334d596769d8cdbb51;hb=bd499dc53276f28994b7ffc833fb8499fb05c5eb;hp=7f5d8a1f8b9b979d01a20097d3c0e720d7ea954c;hpb=ae6eced72dd2562a00f18c15d060bb068921b598;p=open-adventure.git diff --git a/main.c b/main.c index 7f5d8a1..6d904f2 100644 --- a/main.c +++ b/main.c @@ -1280,11 +1280,13 @@ static bool do_command(void) { } } - /* Check to see if the room is dark. If the knife is - * here, and it's dark, the knife permanently disappears - */ + /* Check to see if the room is dark. */ game.wzdark = DARK(game.loc); - if (game.knfloc != LOC_NOWHERE && + + /* If the knife is not here it permanently disappears. + * Possibly this should fire if the knife is here but + * the room is dark? */ + if (game.knfloc > LOC_NOWHERE && game.knfloc != game.loc) { game.knfloc = LOC_NOWHERE; }