[Freeciv-Dev] Re: indefinite improvements
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
|
|