Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] (PR#4538) [Bug] is_enemy_unit_tile sometimes doesn't work
Home

[Freeciv-Dev] (PR#4538) [Bug] is_enemy_unit_tile sometimes doesn't work

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#4538) [Bug] is_enemy_unit_tile sometimes doesn't work in client.
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Fri, 11 Jul 2003 11:11:06 -0700
Reply-to: rt@xxxxxxxxxxxxxx

If you call, from the client, is_enemy_unit_tile on a tile containing
enemy unit in a city, the functio will return NULL.  This so far only
causes problems for path finding but will also cause trouble for any
future client-side AI.

Same problem applies to all is_*_unit_tile functions.

Here we have a choice: 
 (1) fix all is_*_unit_tile functions, 
or 
 (2) fix the functions which use them.
To do (1), the signature of the functions must be changed to bool (not 
that it's ever used as a pointer).

And a problem: the information given by a "occupied" flag over city is not 
complete.  Enemy city may contain neutral unit.  And for the fogged city, 
the occupied flag means nothing.  


G.




[Prev in Thread] Current Thread [Next in Thread]