struct mchrstr *mcp;
double flak, total, ngun;
int gun;
- int rel;
struct plist *plp;
natid plane_owner;
natid from;
mcp = &mchr[(int)ship.shp_type];
if (mcp->m_flags & M_SUB)
continue;
- rel = getrel(getnatp(ship.shp_own), plane_owner);
- if (rel > HOSTILE)
+ if (relations_with(ship.shp_own, plane_owner) > HOSTILE)
continue;
gun = shp_usable_guns(&ship);
if (gun == 0)
struct lchrstr *lcp;
double flak, total, ngun;
int aaf, gun;
- int rel;
struct plist *plp;
natid plane_owner;
natid from;
continue;
if (land.lnd_ship >= 0 || land.lnd_land >= 0)
continue;
- rel = getrel(getnatp(land.lnd_own), plane_owner);
- if (rel > HOSTILE)
+ if (relations_with(land.lnd_own, plane_owner) > HOSTILE)
continue;
flak = aaf * 1.5 * land.lnd_effic / 100.0;
ngun += flak;