No spk remains in the code base
authorNHOrus <jy6x2b32pie9@yahoo.com>
Thu, 13 Jul 2017 17:44:18 +0000 (20:44 +0300)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 14 Jul 2017 01:52:27 +0000 (21:52 -0400)
actions.c
main.c

index 0e6dd7ad69836045cfb6d3785a070d773a4bfecf..40a1928f62d99299970e9a07fef2775cd59196f1 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -477,15 +477,13 @@ static int discard(verb_t verb, obj_t obj)
         game.prop[CAVITY] = CAVITY_FULL;
         if (HERE(RUG) && ((obj == EMERALD && game.prop[RUG] != RUG_HOVER) ||
                           (obj == RUBY && game.prop[RUG] == RUG_HOVER))) {
-            int spk;
             if (obj == RUBY)
-                spk = RUG_SETTLES;
+                rspeak(RUG_SETTLES);
             else if (TOTING(RUG))
-                spk = RUG_WIGGLES;
+                rspeak(RUG_WIGGLES);
             else
-                spk = RUG_RISES;
-            rspeak(spk);
-            if (spk != RUG_WIGGLES) {
+                rspeak(RUG_RISES);
+            if (!TOTING(RUG) || obj == RUBY) {
                 int k = (game.prop[RUG] == RUG_HOVER) ? RUG_FLOOR : RUG_HOVER;
                 game.prop[RUG] = k;
                 if (k == RUG_HOVER)
diff --git a/main.c b/main.c
index db27b16a6a8496726e6db9298e06fcbc4985e70b..37461f7e44d6afd28f5a0998a01e2200be0f53e8 100644 (file)
--- a/main.c
+++ b/main.c
@@ -540,40 +540,39 @@ static void playermove( int motion)
             motion = game.oldlc2;
         game.oldlc2 = game.oldloc;
         game.oldloc = game.loc;
-        int spk = 0;
-        if (motion == game.loc)
-            spk = FORGOT_PATH;
-        if (CNDBIT(game.loc, COND_NOBACK))
-            spk = TWIST_TURN;
-        if (spk == 0) {
-            int te_tmp = 0;
-            for (;;) {
-                enum desttype_t desttype = travel[travel_entry].desttype;
-                scratchloc = travel[travel_entry].destval;
-                if (desttype != dest_goto || scratchloc != motion) {
-                    if (desttype == dest_goto) {
-                        if (FORCED(scratchloc) && travel[tkey[scratchloc]].destval == motion)
-                            te_tmp = travel_entry;
-                    }
-                    if (!travel[travel_entry].stop) {
-                        ++travel_entry;        /* go to next travel entry for this location */
-                        continue;
-                    }
-                    /* we've reached the end of travel entries for game.loc */
-                    travel_entry = te_tmp;
-                    if (travel_entry == 0) {
-                        rspeak(NOT_CONNECTED);
-                        return;
-                    }
-                }
+        if (CNDBIT(game.loc, COND_NOBACK)) {
+            rspeak(TWIST_TURN);
+            return;
+        }
+        if (motion == game.loc) {
+            rspeak(FORGOT_PATH);
+            return;
+        }
 
-                motion = travel[travel_entry].motion;
-                travel_entry = tkey[game.loc];
-                break; /* fall through to ordinary travel */
+        int te_tmp = 0;
+        for (;;) {
+            enum desttype_t desttype = travel[travel_entry].desttype;
+            scratchloc = travel[travel_entry].destval;
+            if (desttype != dest_goto || scratchloc != motion) {
+                if (desttype == dest_goto) {
+                    if (FORCED(scratchloc) && travel[tkey[scratchloc]].destval == motion)
+                        te_tmp = travel_entry;
+                }
+                if (!travel[travel_entry].stop) {
+                    ++travel_entry;    /* go to next travel entry for this location */
+                    continue;
+                }
+                /* we've reached the end of travel entries for game.loc */
+                travel_entry = te_tmp;
+                if (travel_entry == 0) {
+                    rspeak(NOT_CONNECTED);
+                    return;
+                }
             }
-        } else {
-            rspeak(spk);
-            return;
+
+            motion = travel[travel_entry].motion;
+            travel_entry = tkey[game.loc];
+            break; /* fall through to ordinary travel */
         }
     } else if (motion == LOOK) {
         /*  Look.  Can't give more detail.  Pretend it wasn't dark