(add, plane_bomb, pinflak_planedamage, doship, dounit, doplane, laun)
(launch_sat, scra, scut, scuttle_ship, scuttle_land, knockdown) (ac_planedamage, detonate, attack_val, defense_val, air_damage) (msl_intercept, msl_launch_mindam, pln_prewrite, shp_prewrite): Simplify unit destruction: just zero efficiency, leave makelost() etc. to the prewrite callback.
This commit is contained in:
parent
1b94ddedc3
commit
0c1bd8e98b
14 changed files with 26 additions and 98 deletions
|
@ -137,9 +137,7 @@ add(void)
|
||||||
snxtitem_all(&ni, EF_LAND);
|
snxtitem_all(&ni, EF_LAND);
|
||||||
while (nxtitem(&ni, &land)) {
|
while (nxtitem(&ni, &land)) {
|
||||||
if (land.lnd_own == coun) {
|
if (land.lnd_own == coun) {
|
||||||
makelost(EF_LAND, land.lnd_own, land.lnd_uid,
|
land.lnd_effic = 0;
|
||||||
land.lnd_x, land.lnd_y);
|
|
||||||
land.lnd_own = 0;
|
|
||||||
pr("Land unit %d wiped\n", land.lnd_uid);
|
pr("Land unit %d wiped\n", land.lnd_uid);
|
||||||
putland(land.lnd_uid, &land);
|
putland(land.lnd_uid, &land);
|
||||||
}
|
}
|
||||||
|
|
|
@ -690,12 +690,9 @@ plane_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
if (dam > 100)
|
if (dam > 100)
|
||||||
dam = 100;
|
dam = 100;
|
||||||
own = plane.pln_own;
|
own = plane.pln_own;
|
||||||
if (dam > plane.pln_effic) {
|
if (dam > plane.pln_effic)
|
||||||
plane.pln_effic = 0;
|
plane.pln_effic = 0;
|
||||||
makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
|
else
|
||||||
plane.pln_x, plane.pln_y);
|
|
||||||
plane.pln_own = 0;
|
|
||||||
} else
|
|
||||||
plane.pln_effic -= dam;
|
plane.pln_effic -= dam;
|
||||||
plane.pln_mobil = (dam * plane.pln_mobil / 100.0);
|
plane.pln_mobil = (dam * plane.pln_mobil / 100.0);
|
||||||
if (own == player->cnum) {
|
if (own == player->cnum) {
|
||||||
|
@ -904,11 +901,8 @@ pinflak_planedamage(struct plnstr *pp, struct plchrstr *pcp, natid from,
|
||||||
getland(pp->pln_land, &land);
|
getland(pp->pln_land, &land);
|
||||||
take_plane_off_land(pp, &land);
|
take_plane_off_land(pp, &land);
|
||||||
}
|
}
|
||||||
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
|
}
|
||||||
pp->pln_own = 0;
|
putplane(pp->pln_uid, pp);
|
||||||
putplane(pp->pln_uid, pp);
|
|
||||||
} else
|
|
||||||
putplane(pp->pln_uid, pp);
|
|
||||||
|
|
||||||
if (disp > 0)
|
if (disp > 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -805,12 +805,8 @@ doship(char op, int arg, char *p, struct shpstr *ship)
|
||||||
ship->shp_own = (natid)arg;
|
ship->shp_own = (natid)arg;
|
||||||
makenotlost(EF_SHIP, ship->shp_own, ship->shp_uid,
|
makenotlost(EF_SHIP, ship->shp_own, ship->shp_uid,
|
||||||
ship->shp_x, ship->shp_y);
|
ship->shp_x, ship->shp_y);
|
||||||
} else if (!arg) {
|
} else if (!arg)
|
||||||
ship->shp_effic = 0;
|
ship->shp_effic = 0;
|
||||||
makelost(EF_SHIP, ship->shp_own, ship->shp_uid,
|
|
||||||
ship->shp_x, ship->shp_y);
|
|
||||||
ship->shp_own = (natid)0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
if (!sarg_xy(p, &newx, &newy))
|
if (!sarg_xy(p, &newx, &newy))
|
||||||
|
@ -922,12 +918,8 @@ dounit(char op, int arg, char *p, struct lndstr *land)
|
||||||
land->lnd_own = (natid)arg;
|
land->lnd_own = (natid)arg;
|
||||||
makenotlost(EF_LAND, land->lnd_own, land->lnd_uid,
|
makenotlost(EF_LAND, land->lnd_own, land->lnd_uid,
|
||||||
land->lnd_x, land->lnd_y);
|
land->lnd_x, land->lnd_y);
|
||||||
} else if (!arg) {
|
} else if (!arg)
|
||||||
makelost(EF_LAND, land->lnd_own, land->lnd_uid,
|
|
||||||
land->lnd_x, land->lnd_y);
|
|
||||||
land->lnd_effic = 0;
|
land->lnd_effic = 0;
|
||||||
land->lnd_own = (natid)0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
if (!sarg_xy(p, &newx, &newy))
|
if (!sarg_xy(p, &newx, &newy))
|
||||||
|
@ -1059,12 +1051,8 @@ doplane(char op, int arg, char *p, struct plnstr *plane)
|
||||||
plane->pln_x, plane->pln_y);
|
plane->pln_x, plane->pln_y);
|
||||||
wu(player->cnum, plane->pln_own,
|
wu(player->cnum, plane->pln_own,
|
||||||
"%s given to you by deity intervention!\n", prplane(plane));
|
"%s given to you by deity intervention!\n", prplane(plane));
|
||||||
} else if (!arg) {
|
} else if (!arg)
|
||||||
plane->pln_effic = 0;
|
plane->pln_effic = 0;
|
||||||
makelost(EF_PLANE, plane->pln_own, plane->pln_uid,
|
|
||||||
plane->pln_x, plane->pln_y);
|
|
||||||
plane->pln_own = (natid)0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
plane->pln_effic = errcheck(arg, PLANE_MINEFF, 100);
|
plane->pln_effic = errcheck(arg, PLANE_MINEFF, 100);
|
||||||
|
|
|
@ -107,9 +107,7 @@ laun(void)
|
||||||
if (!ship.shp_own) {
|
if (!ship.shp_own) {
|
||||||
pr("%s: ship #%d was sunk!\n",
|
pr("%s: ship #%d was sunk!\n",
|
||||||
prplane(&plane), ship.shp_uid);
|
prplane(&plane), ship.shp_uid);
|
||||||
makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
|
plane.pln_effic = 0;
|
||||||
plane.pln_x, plane.pln_y);
|
|
||||||
plane.pln_own = 0;
|
|
||||||
putplane(plane.pln_uid, &plane);
|
putplane(plane.pln_uid, &plane);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -118,9 +116,7 @@ laun(void)
|
||||||
if (ship.shp_own != player->cnum && rel != ALLIED) {
|
if (ship.shp_own != player->cnum && rel != ALLIED) {
|
||||||
pr("%s: you or an ally do not own ship #%d\n",
|
pr("%s: you or an ally do not own ship #%d\n",
|
||||||
prplane(&plane), ship.shp_uid);
|
prplane(&plane), ship.shp_uid);
|
||||||
makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
|
plane.pln_effic = 0;
|
||||||
plane.pln_x, plane.pln_y);
|
|
||||||
plane.pln_own = 0;
|
|
||||||
putplane(plane.pln_uid, &plane);
|
putplane(plane.pln_uid, &plane);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -159,9 +155,7 @@ laun(void)
|
||||||
if (retval != RET_OK)
|
if (retval != RET_OK)
|
||||||
return retval;
|
return retval;
|
||||||
if (gone) {
|
if (gone) {
|
||||||
makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
|
plane.pln_effic = 0;
|
||||||
plane.pln_x, plane.pln_y);
|
|
||||||
plane.pln_own = 0;
|
|
||||||
putplane(plane.pln_uid, &plane);
|
putplane(plane.pln_uid, &plane);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -410,8 +404,7 @@ launch_sat(struct plnstr *pp, int sublaunch)
|
||||||
pr("3... 2... 1... Blastoff!!!\n");
|
pr("3... 2... 1... Blastoff!!!\n");
|
||||||
if (chance(0.07 + (100 - pp->pln_effic) / 100.0)) {
|
if (chance(0.07 + (100 - pp->pln_effic) / 100.0)) {
|
||||||
pr("KABOOOOM! Range safety officer detonates booster!\n");
|
pr("KABOOOOM! Range safety officer detonates booster!\n");
|
||||||
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
|
pp->pln_effic = 0;
|
||||||
pp->pln_own = 0;
|
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
i = pp->pln_tech + pp->pln_effic;
|
i = pp->pln_tech + pp->pln_effic;
|
||||||
|
|
|
@ -244,9 +244,7 @@ scra(void)
|
||||||
putland(land.lnd_uid, &land);
|
putland(land.lnd_uid, &land);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
makelost(EF_SHIP, item.ship.shp_own, item.ship.shp_uid,
|
item.ship.shp_effic = 0;
|
||||||
item.ship.shp_x, item.ship.shp_y);
|
|
||||||
item.ship.shp_own = 0;
|
|
||||||
putship(item.ship.shp_uid, &item.ship);
|
putship(item.ship.shp_uid, &item.ship);
|
||||||
} else if (type == EF_LAND) {
|
} else if (type == EF_LAND) {
|
||||||
eff = item.land.lnd_effic / 100.0;
|
eff = item.land.lnd_effic / 100.0;
|
||||||
|
@ -312,9 +310,7 @@ scra(void)
|
||||||
putplane(plane.pln_uid, &plane);
|
putplane(plane.pln_uid, &plane);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
makelost(EF_LAND, item.land.lnd_own, item.land.lnd_uid,
|
item.land.lnd_effic = 0;
|
||||||
item.land.lnd_x, item.land.lnd_y);
|
|
||||||
item.land.lnd_own = 0;
|
|
||||||
putland(item.land.lnd_uid, &item.land);
|
putland(item.land.lnd_uid, &item.land);
|
||||||
} else {
|
} else {
|
||||||
eff = item.land.lnd_effic / 100.0;
|
eff = item.land.lnd_effic / 100.0;
|
||||||
|
@ -323,9 +319,7 @@ scra(void)
|
||||||
sect.sct_item[I_LCM] += pp->pl_lcm * 2 / 3 * eff;
|
sect.sct_item[I_LCM] += pp->pl_lcm * 2 / 3 * eff;
|
||||||
sect.sct_item[I_HCM] += pp->pl_hcm * 2 / 3 * eff;
|
sect.sct_item[I_HCM] += pp->pl_hcm * 2 / 3 * eff;
|
||||||
sect.sct_item[I_MILIT] += pp->pl_crew;
|
sect.sct_item[I_MILIT] += pp->pl_crew;
|
||||||
makelost(EF_PLANE, item.plane.pln_own, item.plane.pln_uid,
|
item.plane.pln_effic = 0;
|
||||||
item.plane.pln_x, item.plane.pln_y);
|
|
||||||
item.plane.pln_own = 0;
|
|
||||||
putplane(item.plane.pln_uid, &item.plane);
|
putplane(item.plane.pln_uid, &item.plane);
|
||||||
}
|
}
|
||||||
pr(" scrapped in %s\n",
|
pr(" scrapped in %s\n",
|
||||||
|
|
|
@ -164,9 +164,7 @@ scut(void)
|
||||||
getship(item.plane.pln_ship, &ship);
|
getship(item.plane.pln_ship, &ship);
|
||||||
take_plane_off_ship(&item.plane, &ship);
|
take_plane_off_ship(&item.plane, &ship);
|
||||||
}
|
}
|
||||||
makelost(EF_PLANE, item.plane.pln_own, item.plane.pln_uid,
|
item.plane.pln_effic = 0;
|
||||||
item.plane.pln_x, item.plane.pln_y);
|
|
||||||
item.plane.pln_own = 0;
|
|
||||||
putplane(item.plane.pln_uid, &item.plane);
|
putplane(item.plane.pln_uid, &item.plane);
|
||||||
}
|
}
|
||||||
pr(" scuttled in %s\n",
|
pr(" scuttled in %s\n",
|
||||||
|
@ -271,9 +269,7 @@ scuttle_ship(struct shpstr *sp)
|
||||||
wu(0, plane.pln_own, "Plane %d scuttled in %s\n",
|
wu(0, plane.pln_own, "Plane %d scuttled in %s\n",
|
||||||
plane.pln_uid,
|
plane.pln_uid,
|
||||||
xyas(plane.pln_x, plane.pln_y, plane.pln_own));
|
xyas(plane.pln_x, plane.pln_y, plane.pln_own));
|
||||||
makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
|
plane.pln_effic = 0;
|
||||||
plane.pln_x, plane.pln_y);
|
|
||||||
plane.pln_own = 0;
|
|
||||||
} else {
|
} else {
|
||||||
wu(0, plane.pln_own,
|
wu(0, plane.pln_own,
|
||||||
"Plane %d transferred off ship %d to %s\n",
|
"Plane %d transferred off ship %d to %s\n",
|
||||||
|
@ -299,8 +295,7 @@ scuttle_ship(struct shpstr *sp)
|
||||||
scuttle_land(&land);
|
scuttle_land(&land);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
makelost(EF_SHIP, sp->shp_own, sp->shp_uid, sp->shp_x, sp->shp_y);
|
sp->shp_effic = 0;
|
||||||
sp->shp_own = 0;
|
|
||||||
putship(sp->shp_uid, sp);
|
putship(sp->shp_uid, sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,9 +318,7 @@ scuttle_land(struct lndstr *lp)
|
||||||
wu(0, plane.pln_own, "Plane %d scuttled in %s\n",
|
wu(0, plane.pln_own, "Plane %d scuttled in %s\n",
|
||||||
plane.pln_uid,
|
plane.pln_uid,
|
||||||
xyas(plane.pln_x, plane.pln_y, plane.pln_own));
|
xyas(plane.pln_x, plane.pln_y, plane.pln_own));
|
||||||
makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
|
plane.pln_effic = 0;
|
||||||
plane.pln_x, plane.pln_y);
|
|
||||||
plane.pln_own = 0;
|
|
||||||
} else {
|
} else {
|
||||||
wu(0, plane.pln_own,
|
wu(0, plane.pln_own,
|
||||||
"Plane %d transferred off unit %d to %s\n",
|
"Plane %d transferred off unit %d to %s\n",
|
||||||
|
@ -351,7 +344,6 @@ scuttle_land(struct lndstr *lp)
|
||||||
scuttle_land(&land);
|
scuttle_land(&land);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x, lp->lnd_y);
|
lp->lnd_effic = 0;
|
||||||
lp->lnd_own = 0;
|
|
||||||
putland(lp->lnd_uid, lp);
|
putland(lp->lnd_uid, lp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,9 +126,6 @@ knockdown(struct sctstr *sp, struct emp_qelem *list)
|
||||||
mpr(land.lnd_own, "\07");
|
mpr(land.lnd_own, "\07");
|
||||||
mpr(land.lnd_own, " AARGH! %s tumbles to its doom!\n",
|
mpr(land.lnd_own, " AARGH! %s tumbles to its doom!\n",
|
||||||
prland(&land));
|
prland(&land));
|
||||||
makelost(EF_LAND, land.lnd_own, land.lnd_uid,
|
|
||||||
land.lnd_x, land.lnd_y);
|
|
||||||
land.lnd_own = 0;
|
|
||||||
land.lnd_effic = 0;
|
land.lnd_effic = 0;
|
||||||
putland(land.lnd_uid, &land);
|
putland(land.lnd_uid, &land);
|
||||||
}
|
}
|
||||||
|
@ -149,9 +146,6 @@ knockdown(struct sctstr *sp, struct emp_qelem *list)
|
||||||
mpr(plane.pln_own, "\07");
|
mpr(plane.pln_own, "\07");
|
||||||
mpr(plane.pln_own, " AARGH! %s tumbles to its doom!\n",
|
mpr(plane.pln_own, " AARGH! %s tumbles to its doom!\n",
|
||||||
prplane(&plane));
|
prplane(&plane));
|
||||||
makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
|
|
||||||
plane.pln_x, plane.pln_y);
|
|
||||||
plane.pln_own = 0;
|
|
||||||
plane.pln_effic = 0;
|
plane.pln_effic = 0;
|
||||||
putplane(plane.pln_uid, &plane);
|
putplane(plane.pln_uid, &plane);
|
||||||
}
|
}
|
||||||
|
@ -167,9 +161,6 @@ knockdown(struct sctstr *sp, struct emp_qelem *list)
|
||||||
mpr(nuke.nuk_own, "\07");
|
mpr(nuke.nuk_own, "\07");
|
||||||
mpr(nuke.nuk_own, " %s sinks to the bottom of the sea!\n",
|
mpr(nuke.nuk_own, " %s sinks to the bottom of the sea!\n",
|
||||||
prnuke(&nuke));
|
prnuke(&nuke));
|
||||||
makelost(EF_NUKE, nuke.nuk_own, nuke.nuk_uid,
|
|
||||||
nuke.nuk_x, nuke.nuk_y);
|
|
||||||
nuke.nuk_own = 0;
|
|
||||||
nuke.nuk_effic = 0;
|
nuke.nuk_effic = 0;
|
||||||
putnuke(nuke.nuk_uid, &nuke);
|
putnuke(nuke.nuk_uid, &nuke);
|
||||||
}
|
}
|
||||||
|
|
|
@ -761,8 +761,7 @@ ac_planedamage(struct plist *plp, natid from, int dam, natid other,
|
||||||
getland(pp->pln_land, &land);
|
getland(pp->pln_land, &land);
|
||||||
take_plane_off_land(pp, &land);
|
take_plane_off_land(pp, &land);
|
||||||
}
|
}
|
||||||
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
|
pp->pln_effic = 0;
|
||||||
pp->pln_own = 0;
|
|
||||||
putplane(pp->pln_uid, pp);
|
putplane(pp->pln_uid, pp);
|
||||||
emp_remque(&plp->queue);
|
emp_remque(&plp->queue);
|
||||||
free(plp);
|
free(plp);
|
||||||
|
|
|
@ -301,9 +301,7 @@ detonate(struct nukstr *np, coord x, coord y, int airburst)
|
||||||
continue;
|
continue;
|
||||||
if (roll(100) >= damage)
|
if (roll(100) >= damage)
|
||||||
continue;
|
continue;
|
||||||
makelost(EF_NUKE, nuke.nuk_own, nuke.nuk_uid,
|
nuke.nuk_effic = 0;
|
||||||
nuke.nuk_x, nuke.nuk_y);
|
|
||||||
nuke.nuk_own = 0;
|
|
||||||
if (own == bombown) {
|
if (own == bombown) {
|
||||||
mpr(bombown, "%s at %s destroyed\n",
|
mpr(bombown, "%s at %s destroyed\n",
|
||||||
prnuke(&nuke), xyas(nuke.nuk_x, nuke.nuk_y, own));
|
prnuke(&nuke), xyas(nuke.nuk_x, nuke.nuk_y, own));
|
||||||
|
|
|
@ -64,8 +64,6 @@ attack_val(int combat_mode, struct lndstr *lp)
|
||||||
struct lchrstr *lcp;
|
struct lchrstr *lcp;
|
||||||
|
|
||||||
if (lp->lnd_effic < LAND_MINEFF) {
|
if (lp->lnd_effic < LAND_MINEFF) {
|
||||||
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x, lp->lnd_y);
|
|
||||||
lp->lnd_own = 0;
|
|
||||||
putland(lp->lnd_uid, lp);
|
putland(lp->lnd_uid, lp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -104,8 +102,6 @@ defense_val(struct lndstr *lp)
|
||||||
struct lchrstr *lcp;
|
struct lchrstr *lcp;
|
||||||
|
|
||||||
if (lp->lnd_effic < LAND_MINEFF) {
|
if (lp->lnd_effic < LAND_MINEFF) {
|
||||||
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x, lp->lnd_y);
|
|
||||||
lp->lnd_own = 0;
|
|
||||||
putland(lp->lnd_uid, lp);
|
putland(lp->lnd_uid, lp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1443,11 +1443,8 @@ air_damage(struct emp_qelem *bombers, coord x, coord y, int mission,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* use up missiles */
|
/* use up missiles */
|
||||||
if (plp->pcp->pl_flags & P_M) {
|
if (plp->pcp->pl_flags & P_M)
|
||||||
makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
|
pp->pln_effic = 0;
|
||||||
pp->pln_x, pp->pln_y);
|
|
||||||
pp->pln_own = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return dam;
|
return dam;
|
||||||
|
|
|
@ -343,8 +343,7 @@ msl_intercept(coord x, coord y, natid bombown, int hardtarget,
|
||||||
destroyed = 1;
|
destroyed = 1;
|
||||||
}
|
}
|
||||||
/* zap the missile */
|
/* zap the missile */
|
||||||
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
|
pp->pln_effic = 0;
|
||||||
pp->pln_own = 0;
|
|
||||||
putplane(pp->pln_uid, pp);
|
putplane(pp->pln_uid, pp);
|
||||||
emp_remque(qp);
|
emp_remque(qp);
|
||||||
free(qp);
|
free(qp);
|
||||||
|
@ -414,9 +413,7 @@ msl_launch_mindam(struct emp_qelem *list, coord x, coord y, int hardtarget,
|
||||||
newdam = pln_damage(&plp->plane, x, y, 'p', &nukedam, 0);
|
newdam = pln_damage(&plp->plane, x, y, 'p', &nukedam, 0);
|
||||||
collateral_damage(x, y, newdam, 0);
|
collateral_damage(x, y, newdam, 0);
|
||||||
}
|
}
|
||||||
makelost(EF_PLANE, plp->plane.pln_own, plp->plane.pln_uid,
|
plp->plane.pln_effic = 0;
|
||||||
plp->plane.pln_x, plp->plane.pln_y);
|
|
||||||
plp->plane.pln_own = 0;
|
|
||||||
putplane(plp->plane.pln_uid, &plp->plane);
|
putplane(plp->plane.pln_uid, &plp->plane);
|
||||||
emp_remque(qp);
|
emp_remque(qp);
|
||||||
free(qp);
|
free(qp);
|
||||||
|
|
|
@ -123,9 +123,6 @@ pln_prewrite(int n, void *ptr)
|
||||||
for (i = 0; NULL != (np = getnukep(i)); i++) {
|
for (i = 0; NULL != (np = getnukep(i)); i++) {
|
||||||
if (np->nuk_own && np->nuk_plane == n) {
|
if (np->nuk_own && np->nuk_plane == n) {
|
||||||
mpr(np->nuk_own, "%s lost!\n", prnuke(np));
|
mpr(np->nuk_own, "%s lost!\n", prnuke(np));
|
||||||
makelost(EF_NUKE, np->nuk_own, np->nuk_uid,
|
|
||||||
np->nuk_x, np->nuk_y);
|
|
||||||
np->nuk_own = 0;
|
|
||||||
np->nuk_effic = 0;
|
np->nuk_effic = 0;
|
||||||
np->nuk_plane = -1;
|
np->nuk_plane = -1;
|
||||||
putnuke(np->nuk_uid, np);
|
putnuke(np->nuk_uid, np);
|
||||||
|
|
|
@ -85,9 +85,6 @@ shp_prewrite(int n, void *ptr)
|
||||||
for (i = 0; NULL != (lp = getlandp(i)); i++) {
|
for (i = 0; NULL != (lp = getlandp(i)); i++) {
|
||||||
if (lp->lnd_own && lp->lnd_ship == n) {
|
if (lp->lnd_own && lp->lnd_ship == n) {
|
||||||
mpr(lp->lnd_own, "%s sunk!\n", prland(lp));
|
mpr(lp->lnd_own, "%s sunk!\n", prland(lp));
|
||||||
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid,
|
|
||||||
lp->lnd_x, lp->lnd_y);
|
|
||||||
lp->lnd_own = 0;
|
|
||||||
lp->lnd_effic = 0;
|
lp->lnd_effic = 0;
|
||||||
lp->lnd_ship = -1;
|
lp->lnd_ship = -1;
|
||||||
lp->lnd_land = -1;
|
lp->lnd_land = -1;
|
||||||
|
@ -97,9 +94,6 @@ shp_prewrite(int n, void *ptr)
|
||||||
for (i = 0; NULL != (pp = getplanep(i)); i++) {
|
for (i = 0; NULL != (pp = getplanep(i)); i++) {
|
||||||
if (pp->pln_own && pp->pln_ship == n) {
|
if (pp->pln_own && pp->pln_ship == n) {
|
||||||
mpr(pp->pln_own, "%s sunk!\n", prplane(pp));
|
mpr(pp->pln_own, "%s sunk!\n", prplane(pp));
|
||||||
makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
|
|
||||||
pp->pln_x, pp->pln_y);
|
|
||||||
pp->pln_own = 0;
|
|
||||||
pp->pln_effic = 0;
|
pp->pln_effic = 0;
|
||||||
pp->pln_ship = -1;
|
pp->pln_ship = -1;
|
||||||
pp->pln_land = -1;
|
pp->pln_land = -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue