Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: New AI cleanups (PR#1338)

[Freeciv-Dev] Re: New AI cleanups (PR#1338)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: New AI cleanups (PR#1338)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Sat, 23 Mar 2002 21:16:00 -0800 (PST)

--- Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx> wrote:
> On Sat, 23 Mar 2002, Raahul Kumar wrote:
> > The following diffs are included as a replacement for Aicleanup Version 3.
> > No save games are different, and this was done against March 20 CVS. The
> > changes only touch aiunit.c which has not been effected by any changes to
> the
> > AI according to the changelog.
> > 
> > The patches are:
> > 
> > Unit move turns 2
> I know I am being evil, but I think you should use unit_move_rate from 
> unit.c here...  It takes into account unit health too...

You are evil incarnate itself. Aaargh! I was planning to rewrite
but you are quite right. There seems to be a buglet in unit_move_rate though.
Is this line 

if (!is_air_unit(punit) && !is_heli_unit(punit)) 
val = (val * punit->hp) / unit_type(punit)->hp;

Right? I thought sea units suffered no movement penalties for attacking with
reduced hp. If I use unit_move_rate, I am also introducing behaviour change.
The old one did not take hp into account. 

> And the FIXME comment appears to be malformatted.
> > Fix Sea Moves
> If I were a maintainer I would include this second patch straightaway, and 
> maybe would add the braces and wrap the lines (myself, not ask Raahul to 
> resubmit the patch only to forget about it).

OK, Greg, use both barrels of the shotgun and give it to me straight. Where did
I screw up in formatting again ?

> Best wishes,
> G.

Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®

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