Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Changing interface for generate_warmap (PR#1108)
Home

[Freeciv-Dev] Re: Changing interface for generate_warmap (PR#1108)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Changing interface for generate_warmap (PR#1108)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 Dec 2001 09:15:15 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Dec 13, 2001 at 06:10:33PM +0000, Gregory Berkolaiko wrote:
> No "default" warmap is a jump too big for now.
> There is a lot of confusion in the code now, with functions generating
> warmap being few calls away from the functions using it etc.

To help you I have changed your patch. It now tracks an id of the
generator. Note that 3 autogames have run without a message and there
was also no message during a quick interactive testing. However this
doesn't mean that the dependencies are complete. Interesting:

diff -u -r1.115 settlers.c
--- server/settlers.c   2001/12/06 11:59:07     1.115
+++ server/settlers.c   2001/12/14 07:58:08
@@ -825,9 +833,9 @@
         unit_types[pcity->currently_building].transport_capacity &&
         !unit_flag(pcity->currently_building, F_CARRIER) &&
        !unit_flag(pcity->currently_building, F_MISSILE_CARRIER)) {
-      if (warmap.cost[pcity->x][pcity->y] < best) {
+      if (get_warmap_land(NULL, pcity->x, pcity->y,0,0,0) < best) {
         id = pcity->id;
-        best = warmap.cost[pcity->x][pcity->y];
+        best = get_warmap_land(NULL, pcity->x, pcity->y,0,0,0);
         *x = pcity->x;
         *y = pcity->y;
       }

which means that the get_warmap_land calls are never reached.

Also note that the maps generated by id 3001, 4000 and 5000 aren't
used.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "Heuer's Law: Any feature is a bug unless it can be turned off."

Attachment: local_warmap-2.diff.gz
Description: GNU Zip compressed data


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