]> git.pond.sub.org Git - empserver/commitdiff
retreat: Drop useless write back on failed retreat
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 20 Jan 2014 22:15:29 +0000 (23:15 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 Feb 2014 12:19:26 +0000 (13:19 +0100)
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/subs/retreat.c

index dad5db6700aa6d50c0e104e9cb8dc54a444a2277..3b950f4bc54d75390f61695fcd0b9cc8e9972b0a 100644 (file)
@@ -150,8 +150,6 @@ retreat_ship1(struct shpstr *sp, char code, int orig)
            wu(0, sp->shp_own,
               "%s %s,\nbut had sailing orders, and couldn't retreat!\n",
               prship(sp), conditions[findcondition(code)].desc[orig]);
-           if (!orig)
-               putship(sp->shp_uid, sp);
            return 0;
        }
     }
@@ -160,8 +158,6 @@ retreat_ship1(struct shpstr *sp, char code, int orig)
        wu(0, sp->shp_own,
           "%s %s,\nbut had no crew, and couldn't retreat!\n", prship(sp),
           conditions[findcondition(code)].desc[orig]);
-       if (!orig)
-           putship(sp->shp_uid, sp);
        return 0;
     }
 
@@ -172,16 +168,12 @@ retreat_ship1(struct shpstr *sp, char code, int orig)
        wu(0, sp->shp_own,
           "%s %s,\nbut was caught in a construction zone, and couldn't retreat!\n",
           prship(sp), conditions[findcondition(code)].desc[orig]);
-       if (!orig)
-           putship(sp->shp_uid, sp);
        return 0;
     case NAV_NONE:
     case NAV_CANAL:
        wu(0, sp->shp_own,
           "%s %s,\nbut was landlocked, and couldn't retreat!\n",
           prship(sp), conditions[findcondition(code)].desc[orig]);
-       if (!orig)
-           putship(sp->shp_uid, sp);
        return 0;
     case NAVOK:
        break;
@@ -190,8 +182,6 @@ retreat_ship1(struct shpstr *sp, char code, int orig)
        wu(0, sp->shp_own,
           "%s %s,\nbut was subject to an empire error, and couldn't retreat!\n",
           prship(sp), conditions[findcondition(code)].desc[orig]);
-       if (!orig)
-           putship(sp->shp_uid, sp);
        return 0;
     }
 
@@ -199,8 +189,6 @@ retreat_ship1(struct shpstr *sp, char code, int orig)
        wu(0, sp->shp_own,
           "%s %s,\nbut had no mobility, and couldn't retreat!\n",
           prship(sp), conditions[findcondition(code)].desc[orig]);
-       if (!orig)
-           putship(sp->shp_uid, sp);
        return 0;
     }
 
@@ -398,8 +386,6 @@ retreat_land1(struct lndstr *lp, char code, int orig)
        wu(0, lp->lnd_own,
           "%s %s,\nbut had no mobility, and couldn't retreat!\n",
           prland(lp), conditions[findcondition(code)].desc[orig]);
-       if (!orig)
-           putland(lp->lnd_uid, lp);
        return 0;
     }