Replace some uses of wd[12] with id[12].

This commit is contained in:
Jason S. Ninneman 2017-07-12 13:54:14 -07:00
parent 596a15457d
commit 11043b7246

8
main.c
View file

@ -1151,7 +1151,7 @@ Lookup:
if (++game.iwest == 10) if (++game.iwest == 10)
rspeak(W_IS_WEST); rspeak(W_IS_WEST);
} }
if (strncasecmp(command.raw1, "go", sizeof("go")) == 0 && !wordempty(command.wd2)) { if (strncasecmp(command.raw1, "go", sizeof("go")) == 0 && command.id2 != WORD_EMPTY) {
if (++game.igo == 10) if (++game.igo == 10)
rspeak(GO_UNNEEDED); rspeak(GO_UNNEEDED);
} }
@ -1169,18 +1169,18 @@ Lookup:
switch (type) { switch (type) {
case NO_WORD_TYPE: // FIXME: treating NO_WORD_TYPE as a motion word is confusing case NO_WORD_TYPE: // FIXME: treating NO_WORD_TYPE as a motion word is confusing
case MOTION: case MOTION:
playermove(defn); playermove(command.id1);
return true; return true;
case OBJECT: case OBJECT:
command.part = unknown; command.part = unknown;
command.obj = defn; command.obj = command.id1;
break; break;
case ACTION: case ACTION:
command.part = intransitive; command.part = intransitive;
command.verb = defn; command.verb = defn;
break; break;
case SPECIAL: case SPECIAL:
speak(specials[defn].message); speak(specials[command.id1].message);
goto Lclearobj; goto Lclearobj;
default: default:
BUG(VOCABULARY_TYPE_N_OVER_1000_NOT_BETWEEN_0_AND_3); // LCOV_EXCL_LINE BUG(VOCABULARY_TYPE_N_OVER_1000_NOT_BETWEEN_0_AND_3); // LCOV_EXCL_LINE