Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: RFC: Fixing movement code

[Freeciv-Dev] Re: RFC: Fixing movement code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: RFC: Fixing movement code
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Wed, 28 Nov 2001 22:35:33 +0100

> > > > c is zero everytime, no other assigment, so we can safely remove it
> > > > imho.
> > > 
> > > Maybe, maybe not. c is used in other ai functions.
> > Removed c and the assigment and it compiles fine for me. It really looks
> > this function was originally just copy of an older one, who knows.. However
> > 'c' looks like purely historical thing.
> c is used in numerous ai funcs. I just like to be absolutely sure of the ai
> code. Make one small change and it snowballs into an avalanche.
True. I'm dumb, I messed it up. When we remove c which is zero, we need to
remove too * SHIELD_COST after it. So the formula will look 'a bit' differently
:|.  Sorry for that, just discovered it now when feeding my patches to my
private AI CVS...


                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC
Real Users hate Real Programmers.
Public PGP key, geekcode and stuff:

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