Location arithmetic elimination.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 6 Jul 2017 00:29:50 +0000 (20:29 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 6 Jul 2017 00:29:50 +0000 (20:29 -0400)
actions.c

index 4c2716e68114b241de9848d5e2e4bd48cf4ee3d1..e7574be4f2ce3c0e32af03376c98a04306cc25af 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -813,12 +813,12 @@ static int fly(token_t verb, token_t obj)
     }
     game.oldlc2 = game.oldloc;
     game.oldloc = game.loc;
-    /* FIXME: Arithmetic on location values */
-    game.newloc = game.place[RUG] + game.fixed[RUG] - game.loc;
 
     if (game.prop[SAPPH] == STATE_NOTFOUND) {
+       game.newloc = game.place[SAPPH];
         rspeak(RUG_GOES);
     } else {
+       game.newloc = LOC_CLIFF;
         rspeak(RUG_RETURNS);
     }
     return GO_TERMINATE;