/* Inform neutral and worse */
for (i = 0; i < MAXNOC; ++i) {
- if (getrel(getnatp(i), victim) <= NEUTRAL)
+ if (relations_with(i, victim) <= NEUTRAL)
notified[i] = 0;
else
notified[i] = 1;
return 0; /* Only coastwatch notify in nofortfire */
/* Only fire at Hostile ships */
for (i = 0; i < MAXNOC; ++i) {
- if (getrel(getnatp(i), victim) >= NEUTRAL)
+ if (relations_with(i, victim) >= NEUTRAL)
notified[i] = 0;
}
snxtsct_dist(&ns, newx, newy, fort_max_interdiction_range);
coord newy;
int stopping = 0;
double mobcost;
- double tech; /* for mapping */
char dp[80];
int navigate;
getsect(newx, newy, §);
navigate = shp_check_nav(§, &mlp->unit.ship);
if (navigate != CN_NAVIGABLE ||
- (sect.sct_own && actor != sect.sct_own &&
- getrel(getnatp(sect.sct_own), actor) < FRIENDLY)) {
+ (sect.sct_own
+ && relations_with(sect.sct_own, actor) < FRIENDLY)) {
if (dchr[sect.sct_type].d_nav == NAV_CANAL &&
!(((struct mchrstr *)mlp->chrp)->m_flags & M_CANAL) &&
navigate == CN_LANDLOCKED)
putship(mlp->unit.ship.shp_uid, &mlp->unit.ship);
/* Now update the map for this ship */
- tech = techfact(mlp->unit.ship.shp_tech,
- ((struct mchrstr *)mlp->chrp)->m_vrnge);
rad_map_set(mlp->unit.ship.shp_own,
mlp->unit.ship.shp_x, mlp->unit.ship.shp_y,
- mlp->unit.ship.shp_effic, (int)tech);
+ mlp->unit.ship.shp_effic, mlp->unit.ship.shp_tech,
+ ((struct mchrstr *)mlp->chrp)->m_vrnge);
}
if (QEMPTY(list))
return stopping;
if (!(mchr[(int)ship.shp_type].m_flags & M_ANTIMISSILE))
continue;
- if (getrel(getnatp(ship.shp_own), bombown) >= NEUTRAL)
+ if (relations_with(ship.shp_own, bombown) >= NEUTRAL)
continue;
if (ship.shp_effic < 60)