]> git.pond.sub.org Git - empserver/commitdiff
(unit_interdict, knockdown): Simplify. No functional change.
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 26 Mar 2006 13:55:29 +0000 (13:55 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 26 Mar 2006 13:55:29 +0000 (13:55 +0000)
src/lib/common/bridgefall.c
src/lib/subs/mission.c

index e321cba991007b3228a16549539dc27b45c058d4..be9a7bce9287ad82f25e955c9833c92fd6909b36 100644 (file)
@@ -101,14 +101,10 @@ knockdown(struct sctstr *sp, struct emp_qelem *list)
     struct nstr_item ni;
     struct natstr *np;
 
-    if (sp->sct_type == SCT_BTOWER)
-       mpr(sp->sct_own,
-           "Crumble... SCREEEECH!  Splash! Bridge tower falls at %s!\n",
-           xyas(sp->sct_x, sp->sct_y, sp->sct_own));
-    else
-       mpr(sp->sct_own,
-           "Crumble... SCREEEECH!  Splash! Bridge falls at %s!\n",
-           xyas(sp->sct_x, sp->sct_y, sp->sct_own));
+    mpr(sp->sct_own,
+       "Crumble... SCREEEECH!  Splash! Bridge%s falls at %s!\n",
+       sp->sct_type == SCT_BTOWER ? " tower" : "",
+       xyas(sp->sct_x, sp->sct_y, sp->sct_own));
     sp->sct_type = SCT_WATER;
     sp->sct_newtype = SCT_WATER;
     makelost(EF_SECTOR, sp->sct_own, 0, sp->sct_x, sp->sct_y);
index a6d912aaa8aa686fbf805ffc1f0bcd8b7181752e..60ead607f40bcf80d507c6e79c9ad400fcf2215b 100644 (file)
@@ -197,15 +197,8 @@ unit_interdict(coord x, coord y, natid victim, s_char *s, int hardtarget,
        if (newdam) {
            /* If only subs responded, then we don't know who's
               subs they are */
-           if (osubs) {
-               mpr(victim,
-                   "Enemy interdiction mission does %d damage!\n",
-                   newdam);
-           } else {
-               mpr(victim,
-                   "%s interdiction mission does %d damage!\n",
-                   cname(cn), newdam);
-           }
+           mpr(victim, "%s interdiction mission does %d damage!\n",
+               osubs ? "Enemy" : cname(cn), newdam);
        }
     }
     if (dam) {
@@ -1458,8 +1451,7 @@ air_damage(struct emp_qelem *bombers, coord x, coord y, int mission,
                    "RUMBLE... your sub in %s hears a depth-charge explode nearby\n",
                    xyas(x, y, victim));
            } else if (*s == 's') {
-               mpr(victim,
-                   "SPLASH!  Bombs miss your %s in %s\n",
+               mpr(victim, "SPLASH!  Bombs miss your %s in %s\n",
                    s, xyas(x, y, victim));
            } else {
                mpr(victim, "SPLAT!  Bombs miss your %s in %s\n",