projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix issue #51: rug flying is broken
[open-adventure.git]
/
actions.c
diff --git
a/actions.c
b/actions.c
index 3946b0e7268a0539e9a7b39fd19fccf9b3995bbb..d5cb410bcd8df4db87d5d8ec7a10aa69587053d9 100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-845,15
+845,20
@@
static phase_codes_t fly(verb_t verb, obj_t obj)
rspeak(RUG_NOTHING1);
return GO_CLEAROBJ;
}
rspeak(RUG_NOTHING1);
return GO_CLEAROBJ;
}
- game.oldlc2 = game.oldloc;
- game.oldloc = game.loc;
- if (game.prop[SAPPH] == STATE_NOTFOUND) {
- game.newloc = game.place[SAPPH];
+ if (game.loc == LOC_CLIFF) {
+ game.oldlc2 = game.oldloc;
+ game.oldloc = game.loc;
+ game.newloc = LOC_LEDGE;
rspeak(RUG_GOES);
rspeak(RUG_GOES);
- } else {
+ } else if (game.loc == LOC_LEDGE) {
+ game.oldlc2 = game.oldloc;
+ game.oldloc = game.loc;
game.newloc = LOC_CLIFF;
rspeak(RUG_RETURNS);
game.newloc = LOC_CLIFF;
rspeak(RUG_RETURNS);
+ } else {
+ /* should never happen */
+ rspeak(NOTHING_HAPPENS);
}
return GO_TERMINATE;
}
}
return GO_TERMINATE;
}