Complete.Org: Mailing Lists: Archives: freeciv-ai: November 2004:
[freeciv-ai] Re: (PR#11066) Units that cannot be obsoleted trigger asser
Home

[freeciv-ai] Re: (PR#11066) Units that cannot be obsoleted trigger asser

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory.Berkolaiko@xxxxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#11066) Units that cannot be obsoleted trigger assert for AI
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Nov 2004 22:16:38 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11066 >

Gregory Berkolaiko wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=11066 >
> 
> In advmilitary.c:
> 819  !can_build_unit_direct(pcity, unit_types[unit_type].obsoleted_by))
> 
> But obsoleted_by can be -1 (meaning nobody obsoletes it).  But
> can_build_unit functions have just been made more strict, which causes
> and assert.
> 
> I attach a patch but would rather have can_build_unit_* changed to the
> previous behaviour -- if a looney type is supplied, the answer is of
> course FALSE.

Eventually all the -1 should be replaced with U_LAST, or

   #define U_NONE U_LAST

jason





[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-ai] Re: (PR#11066) Units that cannot be obsoleted trigger assert for AI, Jason Short <=