Restrict ac_encounter() mission_flags to current player
The only user is reco(), so the restriction is fine. Several functions called on behalf of mission_flags assumed it already: plane_sweep(), sathead(), satdisp_sect(), satdisp_units(). Simplify the rest accordingly: plane_sona() and ac_encounter() itself.
This commit is contained in:
parent
e25413a688
commit
2cfb124b6c
2 changed files with 38 additions and 38 deletions
|
@ -272,8 +272,7 @@ plane_sona(struct emp_qelem *plane_list, int x, int y,
|
|||
continue;
|
||||
add_shiplist(targ->shp_uid, head);
|
||||
if (!found) {
|
||||
mpr(pp->pln_own,
|
||||
"\nSonar contact in %s\n", xyas(x, y, pp->pln_own));
|
||||
pr("\nSonar contact in %s\n", xyas(x, y, player->cnum));
|
||||
found = 1;
|
||||
}
|
||||
if (getrel(getnatp(targ->shp_own), pp->pln_own) < FRIENDLY &&
|
||||
|
@ -281,16 +280,14 @@ plane_sona(struct emp_qelem *plane_list, int x, int y,
|
|||
EF_SHIP))
|
||||
if (roll(100) > pln_identchance(pp, shp_hardtarget(targ),
|
||||
EF_SHIP))
|
||||
mpr(pp->pln_own, "sub #%d %s\n", targ->shp_uid,
|
||||
xyas(targ->shp_x, targ->shp_y, pp->pln_own));
|
||||
pr("sub #%d %s\n", targ->shp_uid,
|
||||
xyas(targ->shp_x, targ->shp_y, player->cnum));
|
||||
else
|
||||
mpr(pp->pln_own, "%s %s\n",
|
||||
prship(targ),
|
||||
xyas(targ->shp_x, targ->shp_y, pp->pln_own));
|
||||
pr("%s %s\n", prship(targ),
|
||||
xyas(targ->shp_x, targ->shp_y, player->cnum));
|
||||
else
|
||||
mpr(pp->pln_own, "%s %s @ %s\n",
|
||||
cname(targ->shp_own), prship(targ),
|
||||
xyas(targ->shp_x, targ->shp_y, pp->pln_own));
|
||||
pr("%s %s @ %s\n", cname(targ->shp_own), prship(targ),
|
||||
xyas(targ->shp_x, targ->shp_y, player->cnum));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue