Make bestpath work for deities in foreign land

Before, it only worked in land owned by the deity.

As always, paths can't cross international borders.
This commit is contained in:
Markus Armbruster 2011-02-18 19:29:29 +01:00
parent 791ba26c5e
commit 5962195e9a

View file

@ -52,11 +52,11 @@ best(void)
return RET_SYN; return RET_SYN;
while (!player->aborted && nxtsct(&nstr, &s1)) { while (!player->aborted && nxtsct(&nstr, &s1)) {
if (s1.sct_own != player->cnum) if (!player->owner)
continue; continue;
snxtsct_rewind(&nstr2); snxtsct_rewind(&nstr2);
while (!player->aborted && nxtsct(&nstr2, &s2)) { while (!player->aborted && nxtsct(&nstr2, &s2)) {
if (s2.sct_own != player->cnum) if (!player->owner)
continue; continue;
path = BestLandPath(buf, &s1, &s2, &cost, MOB_MOVE); path = BestLandPath(buf, &s1, &s2, &cost, MOB_MOVE);
if (path) if (path)