if (freeship == 0) {
ef_extend(EF_SHIP, 50);
}
- memset(&ship, 0, sizeof(struct shpstr));
+ ef_blank(EF_SHIP, nstr.cur, &ship);
ship.shp_x = sp->sct_x;
ship.shp_y = sp->sct_y;
ship.shp_destx[0] = sp->sct_x;
} else {
ship.shp_mobil = 0;
}
- ship.shp_uid = nstr.cur;
ship.shp_nplane = 0;
ship.shp_nland = 0;
ship.shp_nxlight = 0;
if (freeland == 0) {
ef_extend(EF_LAND, 50);
}
- memset(&land, 0, sizeof(struct lndstr));
+ ef_blank(EF_LAND, nstr.cur, &land);
land.lnd_x = sp->sct_x;
land.lnd_y = sp->sct_y;
land.lnd_own = player->cnum;
} else {
land.lnd_mobil = 0;
}
- land.lnd_uid = nstr.cur;
land.lnd_army = 0;
land.lnd_flags = 0;
land.lnd_ship = -1;
if (freenuke == 0) {
ef_extend(EF_NUKE, 50);
}
- memset(&nuke, 0, sizeof(struct nukstr));
+ ef_blank(EF_NUKE, nstr.cur, &nuke);
nuke.nuk_x = sp->sct_x;
nuke.nuk_y = sp->sct_y;
nuke.nuk_own = sp->sct_own;
nuke.nuk_effic = 100;
nuke.nuk_stockpile = 0;
nuke.nuk_ship = nuke.nuk_plane = nuke.nuk_land = -1;
- nuke.nuk_uid = nstr.cur;
nuke.nuk_tech = tlev;
vec[I_HCM] -= np->n_hcm;
if (freeplane == 0) {
ef_extend(EF_PLANE, 50);
}
- memset(&plane, 0, sizeof(struct plnstr));
+ ef_blank(EF_PLANE, nstr.cur, &plane);
plane.pln_x = sp->sct_x;
plane.pln_y = sp->sct_y;
plane.pln_own = sp->sct_own;
plane.pln_wing = 0;
plane.pln_ship = -1;
plane.pln_land = -1;
- plane.pln_uid = nstr.cur;
plane.pln_nuketype = -1;
plane.pln_harden = 0;
plane.pln_flags = 0;