(look_ship, look_land): Failed to make contact on sighting ships,
planes and land units. Partial fix for #857594.
This commit is contained in:
parent
4f1ebae4b7
commit
5d207af26f
1 changed files with 7 additions and 2 deletions
|
@ -47,6 +47,7 @@
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
|
|
||||||
static void look_ship(struct shpstr *lookship);
|
static void look_ship(struct shpstr *lookship);
|
||||||
|
static void look_land(struct lndstr *lookland);
|
||||||
|
|
||||||
int
|
int
|
||||||
look(void)
|
look(void)
|
||||||
|
@ -168,11 +169,11 @@ look_ship(struct shpstr *lookship)
|
||||||
pr("%s (#%d) %s @ %s\n",
|
pr("%s (#%d) %s @ %s\n",
|
||||||
cname(sp->shp_own), sp->shp_own, prship(sp),
|
cname(sp->shp_own), sp->shp_own, prship(sp),
|
||||||
xyas(sp->shp_x, sp->shp_y, player->cnum));
|
xyas(sp->shp_x, sp->shp_y, player->cnum));
|
||||||
|
if (opt_HIDDEN)
|
||||||
|
setcont(player->cnum, sp->shp_own, FOUND_LOOK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void look_land(struct lndstr *lookland);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
llook(void)
|
llook(void)
|
||||||
{
|
{
|
||||||
|
@ -287,6 +288,8 @@ look_land(struct lndstr *lookland)
|
||||||
cname(lp->lnd_own), lp->lnd_own,
|
cname(lp->lnd_own), lp->lnd_own,
|
||||||
prland(lp), ldround((double)total_mil(lp), 20),
|
prland(lp), ldround((double)total_mil(lp), 20),
|
||||||
xyas(lp->lnd_x, lp->lnd_y, player->cnum));
|
xyas(lp->lnd_x, lp->lnd_y, player->cnum));
|
||||||
|
if (opt_HIDDEN)
|
||||||
|
setcont(player->cnum, lp->lnd_own, FOUND_LOOK);
|
||||||
}
|
}
|
||||||
for (i = 0; NULL != (pp = getplanep(i)); i++) {
|
for (i = 0; NULL != (pp = getplanep(i)); i++) {
|
||||||
if (pp->pln_own == player->cnum || pp->pln_own == 0)
|
if (pp->pln_own == player->cnum || pp->pln_own == 0)
|
||||||
|
@ -304,5 +307,7 @@ look_land(struct lndstr *lookland)
|
||||||
pr("%s (#%d) %s @ %s\n",
|
pr("%s (#%d) %s @ %s\n",
|
||||||
cname(pp->pln_own), pp->pln_own,
|
cname(pp->pln_own), pp->pln_own,
|
||||||
prplane(pp), xyas(pp->pln_x, pp->pln_y, player->cnum));
|
prplane(pp), xyas(pp->pln_x, pp->pln_y, player->cnum));
|
||||||
|
if (opt_HIDDEN)
|
||||||
|
setcont(player->cnum, pp->pln_own, FOUND_LOOK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue