(retreat_ship1, retreat_land1): Simplify.
This commit is contained in:
parent
f67ca9663a
commit
b60b62780e
1 changed files with 0 additions and 12 deletions
|
@ -139,7 +139,6 @@ retreat_ship1(struct shpstr *sp, char code, int orig)
|
||||||
int shells;
|
int shells;
|
||||||
double mobcost;
|
double mobcost;
|
||||||
struct mchrstr *mcp;
|
struct mchrstr *mcp;
|
||||||
int time_to_stop;
|
|
||||||
int changed;
|
int changed;
|
||||||
|
|
||||||
sp->shp_mission = 0;
|
sp->shp_mission = 0;
|
||||||
|
@ -218,7 +217,6 @@ retreat_ship1(struct shpstr *sp, char code, int orig)
|
||||||
|
|
||||||
n = (-1 * MAX_RETREAT);
|
n = (-1 * MAX_RETREAT);
|
||||||
stopping = 0;
|
stopping = 0;
|
||||||
time_to_stop = 0;
|
|
||||||
while (!stopping && n) {
|
while (!stopping && n) {
|
||||||
dx = dy = 0;
|
dx = dy = 0;
|
||||||
if (sp->shp_rpath[0] == 0) {
|
if (sp->shp_rpath[0] == 0) {
|
||||||
|
@ -306,14 +304,10 @@ retreat_ship1(struct shpstr *sp, char code, int orig)
|
||||||
writemap(sp->shp_own);
|
writemap(sp->shp_own);
|
||||||
sect.sct_mines = mines;
|
sect.sct_mines = mines;
|
||||||
putsect(§);
|
putsect(§);
|
||||||
if (sp->shp_effic < SHIP_MINEFF)
|
|
||||||
time_to_stop = 1;
|
|
||||||
if (!orig)
|
if (!orig)
|
||||||
putship(sp->shp_uid, sp);
|
putship(sp->shp_uid, sp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (time_to_stop)
|
|
||||||
stopping = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (orig) {
|
if (orig) {
|
||||||
|
@ -404,7 +398,6 @@ retreat_land1(struct lndstr *lp, char code, int orig)
|
||||||
int shells;
|
int shells;
|
||||||
double mobcost;
|
double mobcost;
|
||||||
struct lchrstr *lcp;
|
struct lchrstr *lcp;
|
||||||
int time_to_stop;
|
|
||||||
|
|
||||||
lp->lnd_mission = 0;
|
lp->lnd_mission = 0;
|
||||||
if (lp->lnd_own == 0)
|
if (lp->lnd_own == 0)
|
||||||
|
@ -433,7 +426,6 @@ retreat_land1(struct lndstr *lp, char code, int orig)
|
||||||
|
|
||||||
n = (-1 * MAX_RETREAT);
|
n = (-1 * MAX_RETREAT);
|
||||||
stopping = 0;
|
stopping = 0;
|
||||||
time_to_stop = 0;
|
|
||||||
while (!stopping && n) {
|
while (!stopping && n) {
|
||||||
dx = dy = 0;
|
dx = dy = 0;
|
||||||
if (lp->lnd_rpath[0] == 0) {
|
if (lp->lnd_rpath[0] == 0) {
|
||||||
|
@ -513,14 +505,10 @@ retreat_land1(struct lndstr *lp, char code, int orig)
|
||||||
mines--;
|
mines--;
|
||||||
sect.sct_mines = mines;
|
sect.sct_mines = mines;
|
||||||
putsect(§);
|
putsect(§);
|
||||||
if (lp->lnd_effic < LAND_MINEFF)
|
|
||||||
time_to_stop = 1;
|
|
||||||
if (!orig)
|
if (!orig)
|
||||||
putland(lp->lnd_uid, lp);
|
putland(lp->lnd_uid, lp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (time_to_stop)
|
|
||||||
stopping = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (orig) {
|
if (orig) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue