X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=actions.c;h=4fd0dda52652fe7941e58390779a5eaf407e4960;hb=8bd947b54d365f4e8a119be761021be055ea8748;hp=682b03bd6cdecfa66e59203e967ef6552baf8cc8;hpb=29b8f5b142d15f75cf37fc9c2cfd4b549d18d2d4;p=open-adventure.git diff --git a/actions.c b/actions.c index 682b03b..4fd0dda 100644 --- a/actions.c +++ b/actions.c @@ -930,8 +930,7 @@ static int listen(void) * depending on whether player has drunk dragon's blood. */ if (i == BIRD) mi += 3 * game.blooded; - long packed_zzword = token_to_packed(game.zzword); - pspeak(i, hear, mi, true, packed_zzword); + pspeak(i, hear, mi, true, game.zzword); rspeak(NO_MESSAGE); if (i == BIRD && mi == BIRD_ENDSTATE) DESTROY(BIRD); @@ -1355,7 +1354,10 @@ int action(struct command_t *command) if (command->raw2[0] != '\0' && command->verb != SAY) return GO_WORD2; if (command->verb == SAY) - command->obj = command->wd2; + /* KEYS is not special, anything not NO_OBJECT or INTRANSITIVE + * will do here. We're preventing interpretation as an intransitive + * verb when the word is unknown. */ + command->obj = command->raw2[0] != '\0' ? KEYS : NO_OBJECT; if (command->obj == NO_OBJECT || command->obj == INTRANSITIVE) { /* Analyse an intransitive verb (ie, no object given yet). */