Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: PATCHES: AI cleanups (PR#1176)
Home

[Freeciv-Dev] Re: PATCHES: AI cleanups (PR#1176)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: PATCHES: AI cleanups (PR#1176)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Mon, 31 Dec 2001 12:15:18 +0000 (GMT)

 --- Raahul Kumar <raahul_da_man@xxxxxxxxx> wrote: 
> 
> Eek. I thought I fixed that. Thanks for the save G. By the way, the
> reason I did not employ igter_speedup was that a certain someone 
> suggested sending
> in unit_move_turns by itself. The igter stuff is a patch by itself,
> when that is accepted I will go ahead and change move_rate *= to 
> igter_speedup.

Yes I know, I gave more or less conflicting requests :(

But the line 

if (igter) move_rate *= SINGLE_MOVE

is plain WRONG, much worse than 

if (igter) move_rate *= 3;

Just imagine what happens if somebody changes SINGLE_MOVE...

So I just wouldn't want your patches to be potentially buggy, just write
if (igter) move_rate *= (SINLGE_MOVE/MOVE_COST_ROAD)

And later when you introduce IGTER_SPEEDUP you can change this line
again.


And the comment should go to the place where you define IGTER_SPEEDUP,
that would be the best, I feel.

> So for now I will just add some lines as comment
> 
> // FIXME: IGTER units should have their move rates multiplied by
> igter_speedup
> // Note: actually, igter units should never have their move rates
> multiplied.
> // The correct behaviour is to have every tile they cross cost 1/3 of a
> movement
> // point.
> 
> Good comment? No, the comments in the code will not be C++ style, I
> just
> happen to like that style.

I agree it is nice.

G.


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


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