Magic-number elimination.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 6 Jul 2017 11:42:41 +0000 (07:42 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 6 Jul 2017 11:42:41 +0000 (07:42 -0400)
actions.c

index 588b4d979aa51d3bf2e9e418035d61429fdabaf5..a384e61431e96f1531397f159e2e2e723bcd27d5 100644 (file)
--- 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) {