From: Eric S. Raymond Date: Thu, 6 Jul 2017 11:42:41 +0000 (-0400) Subject: Magic-number elimination. X-Git-Tag: 2017-07-10~48 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=da6a090b833070da1726a92d5db3b476c2313050;p=open-adventure.git Magic-number elimination. --- diff --git a/actions.c b/actions.c index 588b4d9..a384e61 100644 --- a/actions.c +++ b/actions.c @@ -1289,10 +1289,10 @@ int action(struct command_t *command) else if ((LIQUID() == command->obj && HERE(BOTTLE)) || command->obj == LIQLOC(game.loc)) /* FALL THROUGH */; - else if (command->obj == OIL && HERE(URN) && game.prop[URN] != 0) { + else if (command->obj == OIL && HERE(URN) && game.prop[URN] != URN_EMPTY) { command->obj = URN; /* FALL THROUGH */; - } else if (command->obj == PLANT && AT(PLANT2) && game.prop[PLANT2] != 0) { + } else if (command->obj == PLANT && AT(PLANT2) && game.prop[PLANT2] != PLANT_THIRSTY) { command->obj = PLANT2; /* FALL THROUGH */; } else if (command->obj == KNIFE && game.knfloc == game.loc) {