Use relations_with() in owned_and_navigable()
This removes a special case for POGO (#0). Before, unoccupied sectors were treated as "own or allied" for POGO, but not for other deities. Impact on callers: * BestAirPath() is not affected, because the change is only reachable with a non-null bigmap argument. * sorde() and nav_ship() pass a non-zero ship owner. sorde() ensures that itself, and prod_ship() does it for nav_ship(). * unit_path() passes the player number when called with a ship argument, i.e. in the navigate command. Player number is zero for POGO. Since deities can't navigate foreign ships, this can happen only when POGO navigates dead ships. Yes, that's possible, needs fixing. * getpath() passes the player number (zero for POGO) when called with argument P_SAILING, i.e. by the sail command. Thus, the change makes navigate's and sail's path finding work for POGO exactly like it does for other deities. That's fine.
This commit is contained in:
parent
5245cde582
commit
9100af0b82
1 changed files with 1 additions and 2 deletions
|
@ -201,8 +201,7 @@ owned_and_navigable(char *bigmap, int x, int y, int own)
|
|||
|
||||
/* Owned or allied sector? Check the real sector. */
|
||||
getsect(x, y, §);
|
||||
if (sect.sct_own == own
|
||||
|| (sect.sct_own && getrel(getnatp(sect.sct_own), own) == ALLIED)) {
|
||||
if (sect.sct_own && relations_with(sect.sct_own, own) == ALLIED) {
|
||||
/* FIXME duplicates shp_check_nav() logic */
|
||||
switch (dchr[sect.sct_type].d_nav) {
|
||||
case NAVOK:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue