One bit less math on states

This commit is contained in:
NHOrus 2017-07-05 19:33:01 +03:00 committed by Eric S. Raymond
parent 40ff648431
commit 23aced5c7c

View file

@ -469,7 +469,7 @@ static int discard(token_t verb, token_t obj, bool just_do_it)
rspeak(spk); rspeak(spk);
if (spk != RUG_WIGGLES) { if (spk != RUG_WIGGLES) {
/* FIXME: Arithmetic on state numbers */ /* 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; game.prop[RUG] = k;
if (k == RUG_HOVER) if (k == RUG_HOVER)
k = objects[SAPPH].plac; k = objects[SAPPH].plac;