Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12840) delay in pollution patrol (possible causes)
Home

[Freeciv-Dev] (PR#12840) delay in pollution patrol (possible causes)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bdunstan149@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#12840) delay in pollution patrol (possible causes)
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Apr 2005 12:14:38 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12840 >

I like the design.  A few things about the implementation need fixing:

- Unit_type_id is not what you think it is.  It gives the type of a
unit, not its ID.  The ID is just an int (I think?).

- Don't add new fields to the tile struct.  Instead make a new array of
tile data in settlers.c.  This array can be reinitialized when the map
is resized or on every turn or whatever.  See the warmap struct in
gotohand.c or the map_deco struct in mapview_common.c or the
pf_map->lattice struct in path_finding.c for other examples.

- Use FC_INFINITY, not INT_MAX.

- Instead of using the "travel time" shouldn't you use the
turns-to-completion?  E.g., if we have a high-priority task it's better
to assign an engineer to it.  (Not entirely sure about this.)

-jason




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