[freeciv-ai] Re: [Freeciv-Dev] (PR#12550) [Patch] Fix H_HUTS
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12550 >
This version should handle fogged tiles correctly when H_HUTS set.
- ML
diff -Nurd -X.diff_ignore freeciv/ai/aiexplorer.c freeciv/ai/aiexplorer.c
--- freeciv/ai/aiexplorer.c 2005-03-20 17:26:45.343750000 +0200
+++ freeciv/ai/aiexplorer.c 2005-03-20 21:59:50.843750000 +0200
@@ -226,9 +226,13 @@
desirable = 0;
}
- if ((!pplayer->ai.control || !ai_handicap(pplayer, H_HUTS))
- && map_is_known(ptile, pplayer)
- && map_has_special(ptile, S_HUT)) {
+ /* AI players without H_HUTS handicap see truth, others
+ * think that there is hut iff private map says so */
+ if ((map_has_special(ptile, S_HUT) && pplayer->ai.control
+ && !ai_handicap(pplayer, H_HUTS))
+ || (((pplayer->private_map + ptile->index)->special & S_HUT)
+ && (!pplayer->ai.control
+ || (pplayer->ai.control && ai_handicap(pplayer, H_HUTS))))) {
/* we want to explore huts whenever we can,
* even if doing so will not uncover any tiles. */
desirable += HUT_SCORE;
- [freeciv-ai] Re: [Freeciv-Dev] (PR#12550) [Patch] Fix H_HUTS,
Marko Lindqvist <=
|
|