]> git.pond.sub.org Git - empserver/commitdiff
Delete some code that has been disabled out for ages and looks
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Jul 2005 18:35:07 +0000 (18:35 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Jul 2005 18:35:07 +0000 (18:35 +0000)
useless or wrong.

src/lib/commands/buil.c
src/lib/commands/load.c
src/lib/subs/fortdef.c
src/lib/subs/retreat.c
src/lib/update/sect.c

index 7e40e4bffe82e7547d5aa53c98fed0409685ca06..bd729f6463ac7c6b73d22baf6523ea12f51c989a 100644 (file)
@@ -602,32 +602,6 @@ build_bridge(struct sctstr *sp, short *vec)
                return 0;
        }
     }
-#if 0
-    else {
-
-       for (i = 1; i <= 6; i++) {
-           struct sctstr s2;
-           nx = sp->sct_x + diroff[i][0];
-           ny = sp->sct_y + diroff[i][1];
-           getsect(nx, ny, &sect);
-           for (j = 1; j <= 6; j++) {
-               nx2 = sect.sct_x + diroff[j][0];
-               ny2 = sect.sct_y + diroff[j][1];
-               getsect(nx2, ny2, &s2);
-               if ((s2.sct_type != SCT_WATER) &&
-                   (s2.sct_type != SCT_BSPAN))
-                   good = 1;
-           }
-
-       }
-
-       if (!good) {
-           pr("Bridges must be built adjacent to land or bridge towers.\n");
-           pr("No eligible sectors adjacent to this sector.\n");
-           return 0;
-       }
-    }                          /* end EASY_BRIDGES */
-#endif
 
     if (sp->sct_effic < 60 && !player->god) {
        pr("Sector %s is not 60%% efficient.\n",
index ead2aa64a2c6008b805707f35514b76297855e31..4f7d71b31dfd5a892119b335480e092027912b51 100644 (file)
@@ -628,16 +628,6 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
                }
                return 0;
            }
-#if 0
-           if (sp->shp_nland >= mchr[(int)sp->shp_type].m_nland) {
-               if (noisy)
-                   if (mchr[(int)sp->shp_type].m_nland)
-                       pr("%s doesn't have room for any more land units!\n", prship(sp));
-                   else
-                       pr("%s cannot carry land units!\n", prship(sp));
-               break;
-           }
-#endif
            sprintf(buf, "loaded on your %s at %s",
                    prship(sp), xyas(sp->shp_x, sp->shp_y, sp->shp_own));
            gift(sp->shp_own, player->cnum, (s_char *)&land, EF_LAND, buf);
index 0a99b691de84d7a96012a1105119479a81029f92..562a35440f65b1958faddfd8ac82f0bd54e25321 100644 (file)
@@ -144,27 +144,6 @@ sd(natid att, natid own, coord x, coord y, int noisy, int defending,
     return (int)100 - (eff * 100);
 }
 
-/*
- * Determine if any nearby gun-equipped sectors are within
- * range and able to fire at an attacker.  Firing sectors
- * need to have guns, shells, and military.  Sector being
- * attacked is x,y -- attacker is at ax,ay.
- */
-#if 0
-/* defdef isn't called anywhere, and uses wrong
- * number of arguments for dd */
-int
-defdef(att, def_own, defval, ax, ay)
-natid att;
-natid def_own;
-int defval;
-coord ax;
-coord ay;
-{
-    return dd(att, def_own, defval, ax, ay, NOISY, 1);
-}
-#endif
-
 int
 dd(natid att, natid def_own, coord ax, coord ay, int noisy, int defending)
 {
index 99b0cdd9dbf9a0343ba5459d88156e72430b6a02..141860f75a5e47a9e754016f42fee25456d3ee04 100644 (file)
@@ -339,30 +339,6 @@ retreat_ship1(struct shpstr *sp, s_char code, int orig)
     return 1;
 }
 
-#if 0
-static int
-check_nav(sect)
-struct sctstr *sect;
-{
-    switch (dchr[sect->sct_type].d_flg & 03) {
-    case NAVOK:
-       break;
-
-    case NAV_02:
-       if (sect->sct_effic < 2)
-           return CN_CONSTRUCTION;
-       break;
-    case NAV_60:
-       if (sect->sct_effic < 60)
-           return CN_CONSTRUCTION;
-       break;
-    default:
-       return CN_LANDLOCKED;
-    }
-    return CN_NAVIGABLE;
-}
-#endif
-
 static int
 findcondition(s_char code)
 {
index 4a98cf5968454dd8d6881c0476bbdc1b1d3f347a..d4f162731a6763354ee87400418207f57511bd37 100644 (file)
@@ -247,14 +247,6 @@ spread_fallout(struct sctstr *sp, int etus)
        if (ap->sct_type == SCT_SANCT)
            continue;
        inc = roundavg(etus * fallout_spread * (sp->sct_fallout)) - 1;
-#if 0
-       if (sp->sct_fallout) {
-           wu(0, 0, "Fallout from sector %d,%d to %d,%d is %d=%d*%e*%d\n",
-              sp->sct_x, sp->sct_y, sp->sct_x + diroff[n][0],
-              sp->sct_y + diroff[n][1], inc, etus,
-              fallout_spread, sp->sct_fallout);
-       }
-#endif
        if (inc < 0)
            inc = 0;
        ap->sct_fallout = min(ap->sct_fallout + inc, FALLOUT_MAX);
@@ -271,12 +263,6 @@ decay_fallout(struct sctstr *sp, int etus)
     decay = roundavg(((decay_per_etu + 6.0) * fallout_spread) *
                     (double)etus * (double)sp->sct_fallout);
 
-#if 0
-    if (decay || sp->sct_fallout)
-       wu(0, 0, "Fallout decay in %d,%d is %d from %d\n", sp->sct_x,
-          sp->sct_y, decay, sp->sct_fallout);
-#endif
-
     sp->sct_fallout = decay < sp->sct_fallout ? sp->sct_fallout - decay : 0;
 }