Delete some code that has been disabled out for ages and looks

useless or wrong.
This commit is contained in:
Markus Armbruster 2005-07-23 18:35:07 +00:00
parent 4bfb66a255
commit c41c45be61
5 changed files with 0 additions and 95 deletions

View file

@ -602,32 +602,6 @@ build_bridge(struct sctstr *sp, short *vec)
return 0; 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) { if (sp->sct_effic < 60 && !player->god) {
pr("Sector %s is not 60%% efficient.\n", pr("Sector %s is not 60%% efficient.\n",

View file

@ -628,16 +628,6 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
} }
return 0; 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", sprintf(buf, "loaded on your %s at %s",
prship(sp), xyas(sp->shp_x, sp->shp_y, sp->shp_own)); prship(sp), xyas(sp->shp_x, sp->shp_y, sp->shp_own));
gift(sp->shp_own, player->cnum, (s_char *)&land, EF_LAND, buf); gift(sp->shp_own, player->cnum, (s_char *)&land, EF_LAND, buf);

View file

@ -144,27 +144,6 @@ sd(natid att, natid own, coord x, coord y, int noisy, int defending,
return (int)100 - (eff * 100); 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 int
dd(natid att, natid def_own, coord ax, coord ay, int noisy, int defending) dd(natid att, natid def_own, coord ax, coord ay, int noisy, int defending)
{ {

View file

@ -339,30 +339,6 @@ retreat_ship1(struct shpstr *sp, s_char code, int orig)
return 1; 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 static int
findcondition(s_char code) findcondition(s_char code)
{ {

View file

@ -247,14 +247,6 @@ spread_fallout(struct sctstr *sp, int etus)
if (ap->sct_type == SCT_SANCT) if (ap->sct_type == SCT_SANCT)
continue; continue;
inc = roundavg(etus * fallout_spread * (sp->sct_fallout)) - 1; 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) if (inc < 0)
inc = 0; inc = 0;
ap->sct_fallout = min(ap->sct_fallout + inc, FALLOUT_MAX); 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) * decay = roundavg(((decay_per_etu + 6.0) * fallout_spread) *
(double)etus * (double)sp->sct_fallout); (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; sp->sct_fallout = decay < sp->sct_fallout ? sp->sct_fallout - decay : 0;
} }