Removed line as redundant
As of 8675c4facd
lines 612-613 in main.c unreachable due to earlier
dispatch at line 1132 that redirects all find/inventory verbs into actions.c
Message NEARBY fires from YAML link to those verbs.
Also, reduced signature of playermove() to motion only.
This commit is contained in:
parent
8675c4facd
commit
d6dab20801
1 changed files with 4 additions and 6 deletions
10
main.c
10
main.c
|
@ -521,7 +521,7 @@ static void croak(void)
|
||||||
* him, so we need game.oldlc2, which is the last place he was
|
* him, so we need game.oldlc2, which is the last place he was
|
||||||
* safe.) */
|
* safe.) */
|
||||||
|
|
||||||
static bool playermove(token_t verb, int motion)
|
static bool playermove( int motion)
|
||||||
{
|
{
|
||||||
int scratchloc, travel_entry = tkey[game.loc];
|
int scratchloc, travel_entry = tkey[game.loc];
|
||||||
game.newloc = game.loc;
|
game.newloc = game.loc;
|
||||||
|
@ -609,8 +609,6 @@ static bool playermove(token_t verb, int motion)
|
||||||
spk = UNSURE_FACING;
|
spk = UNSURE_FACING;
|
||||||
if (motion == OUTSIDE || motion == INSIDE)
|
if (motion == OUTSIDE || motion == INSIDE)
|
||||||
spk = NO_INOUT_HERE;
|
spk = NO_INOUT_HERE;
|
||||||
if (verb == FIND || verb == INVENTORY)
|
|
||||||
spk = NEARBY;
|
|
||||||
if (motion == XYZZY || motion == PLUGH)
|
if (motion == XYZZY || motion == PLUGH)
|
||||||
spk = NOTHING_HAPPENS;
|
spk = NOTHING_HAPPENS;
|
||||||
if (motion == CRAWL)
|
if (motion == CRAWL)
|
||||||
|
@ -997,7 +995,7 @@ static bool do_command()
|
||||||
rspeak(TAME_BEAR);
|
rspeak(TAME_BEAR);
|
||||||
speak(msg);
|
speak(msg);
|
||||||
if (FORCED(game.loc)) {
|
if (FORCED(game.loc)) {
|
||||||
if (playermove(command.verb, 1))
|
if (playermove(MOT_1))
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
continue; /* back to top of main interpreter loop */
|
continue; /* back to top of main interpreter loop */
|
||||||
|
@ -1131,7 +1129,7 @@ Lookup:
|
||||||
kmod = MOD(defn, 1000);
|
kmod = MOD(defn, 1000);
|
||||||
switch (defn / 1000) {
|
switch (defn / 1000) {
|
||||||
case 0:
|
case 0:
|
||||||
if (playermove(command.verb, kmod))
|
if (playermove(kmod))
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
continue; /* back to top of main interpreter loop */
|
continue; /* back to top of main interpreter loop */
|
||||||
|
@ -1155,7 +1153,7 @@ Laction:
|
||||||
case GO_TERMINATE:
|
case GO_TERMINATE:
|
||||||
return true;
|
return true;
|
||||||
case GO_MOVE:
|
case GO_MOVE:
|
||||||
playermove(command.verb, NUL);
|
playermove(NUL);
|
||||||
return true;
|
return true;
|
||||||
case GO_TOP:
|
case GO_TOP:
|
||||||
continue; /* back to top of main interpreter loop */
|
continue; /* back to top of main interpreter loop */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue