From: NHOrus Date: Wed, 5 Jul 2017 16:33:01 +0000 (+0300) Subject: One bit less math on states X-Git-Tag: takebird~6 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=23aced5c7c0d877a5ffdbe6f6ac12b5115dac554;p=open-adventure.git One bit less math on states --- diff --git a/actions.c b/actions.c index f73fa5c..971bbb3 100644 --- a/actions.c +++ b/actions.c @@ -469,7 +469,7 @@ static int discard(token_t verb, token_t obj, bool just_do_it) rspeak(spk); if (spk != RUG_WIGGLES) { /* FIXME: Arithmetic on state numbers */ - int k = 2 - game.prop[RUG]; + int k = (game.prop[RUG] == RUG_HOVER) ? RUG_FLOOR : RUG_HOVER; game.prop[RUG] = k; if (k == RUG_HOVER) k = objects[SAPPH].plac;