[Freeciv-Dev] (PR#9825) remove T_OCEAN references in ai
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9825 >
This patch removes two T_OCEAN references in the ai/ code.
Note to developers: please don't add any new terrain references into the
code outside of mapgen.c. Instead your checks should be done on terrain
flags, move cost, or whatever specific property it is you're interested in.
jason
Index: ai/aiferry.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aiferry.c,v
retrieving revision 1.3
diff -u -r1.3 aiferry.c
--- ai/aiferry.c 6 Aug 2004 14:46:28 -0000 1.3
+++ ai/aiferry.c 26 Aug 2004 21:17:40 -0000
@@ -237,7 +237,7 @@
if (is_ocean(tgt_tile->terrain)) {
/* Any-to-Sea */
move_cost = 0;
- } else if (src_tile->terrain == T_OCEAN) {
+ } else if (is_ocean(src_tile->terrain)) {
/* Sea-to-Land */
move_cost = PF_IMPOSSIBLE_MC;
} else {
Index: ai/aisettler.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aisettler.c,v
retrieving revision 1.3
diff -u -r1.3 aisettler.c
--- ai/aisettler.c 7 Aug 2004 17:58:56 -0000 1.3
+++ ai/aisettler.c 26 Aug 2004 21:17:41 -0000
@@ -314,7 +314,7 @@
**************************************************************************/
static int naval_bonus(struct cityresult *result, struct ai_data *ai)
{
- bool ocean_adjacent = is_terrain_near_tile(result->x, result->y, T_OCEAN);
+ bool ocean_adjacent = is_ocean_near_tile(result->x, result->y);
/* Adjust for ocean adjacency, which is nice */
if (ocean_adjacent) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#9825) remove T_OCEAN references in ai,
Jason Short <=
|
|