Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: indefinite improvements
Home

[Freeciv-Dev] Re: indefinite improvements

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: indefinite improvements
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sun, 20 Aug 2000 15:22:34 +1000 (EST)

Jeff Mallatt wrote:

> The next step towards generalized improvements is allowing an indefinite
> number of improvements.  The attached patch does this (though, it includes
> a check in the ruleset loader to make sure rulesets still only define the
> proper number of improvements to match the still burned-in
> improvement_type_id enum).

One likely problem I noticed is in common/worklist.h:

#define WORKLIST_END (U_LAST+B_LAST+MAX_NUM_WORKLISTS)

This value is used in protocol and in savegames as a marker
past last used entry in worklist.  Since this patch changes B_LAST,
the numerical value of WORKLIST_END changes (from 284 to 416?) which
I guess means problems (I haven't looked).

Suggested fixes:  Use (-1), or 0xFFFF for WORKLIST_END, and
use some sort of work-around for code which currently checks 
for specific value of WORKLIST_END (eg, look for out-of-range
value, or 284 from old clients, etc).

-- David



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