]> git.pond.sub.org Git - empserver/commit
Use relations_with() in owned_and_navigable()
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 30 Jan 2011 17:32:19 +0000 (18:32 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 18 Feb 2011 17:44:49 +0000 (18:44 +0100)
commit9100af0b82227fb3d5f5c07743567142f857dd94
tree3a1047a9d6d6e40f185ecbb4fb7c5beedce15045
parent5245cde582b023d239ea52ac8825753bc04c1f5a
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.
src/lib/common/bestpath.c