[Freeciv-Dev] Re: unit flags/capabilities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Dec 01, 2001 at 12:02:49AM +0100, Reinier Post wrote:
> On Fri, Nov 30, 2001 at 10:57:09PM +0100, Raimar Falke wrote:
> > On Fri, Nov 30, 2001 at 10:20:52PM +0100, Reinier Post wrote:
> > > On Thu, Nov 29, 2001 at 05:52:14PM +0100, Raimar Falke wrote:
> > >
> > > > > Ideally, all unit behaviour should depend on flags, ot the unit
> > > > > type, but flags are a later introduction and the conversion is not
> > > > > complete.
> > > >
> > > > AFAIK there is no such place left.
> > >
> > > OK, the only cases seem to be a few lines in ai/aicity.c and ai/aiunit.c.
> >
> > Which one?
>
> /var/tmp/src/freeciv/freeciv % grep '[^A-Z_]U_' `find . -name \*.c` | fgrep
> -v _LAST
> ./ai/aicity.c: ai_city_defender_value(pcity, U_LEGION, bestchoice.choice)) *
> 2 &&
> ./ai/aicity.c: /* return ((U_WARRIORS <= unit_type) && (unit_type <=
> U_MECH)); */
> ./ai/aiunit.c: return (base==U_WARRIORS && test==U_PHALANX)
> ./ai/aiunit.c: || (base==U_PHALANX && test==U_MUSKETEERS);
> ./ai/aiunit.c: for (i = U_WARRIORS; i <= U_BATTLESHIP; i++)
> ./common/combat.c: (For calls which used to be g_v_d_p(U_HOWITZER,...))
> ./server/gotohand.c: /* (?) was punit->type == U_SETTLERS -- dwp */
There is only one problem: these U_* constants aren't defined
anymore. So all this code is/has to be a comment. Does anybody create
a patch which cleans this up?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"How about the new language C&? No, that's not 'c ampersand', 'c reference',
'reference to c' or 'c and'. It's pronounced 'campersand', to confuse the
hell out of people who are unfamiliar with it, and it will, of course,
have no pointers."
-- Xazziri in comp.lang.c++ about C#
- [Freeciv-Dev] Re: unit flags/capabilities,
Raimar Falke <=
|
|