Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)
Home

[Freeciv-Dev] Re: [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>, Petr Baudis <pasky@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Sun, 3 Mar 2002 20:15:24 -0800 (PST)

--- Raahul Kumar <raahul_da_man@xxxxxxxxx> wrote:



> > -      m = get_virtual_defense_power(i, n, x, y);
> 
> You're removing those lines. Explanation why they are not needed?
>

Sorry. I just spotted where you have moved them.
 
> > -      m *= unit_types[n].hp * unit_types[n].firepower;
> > -      if (vet) m *= 1.5;
> > -      m /= 30;
> > -      m *= m;
> > -      d = m;


> > +      vuln = get_virtual_defense_power(unit_type, victim_unit_type, x, y);
> > +      vuln *= unit_types[victim_unit_type].hp *
> > +              unit_types[victim_unit_type].firepower;

This should probably be a function. I can't help wondering if there is already
something in combat.c that does this. It all look so goddamn eerily familiar.

> > +      if (veteran) vuln *= 1.5;
> > +      vuln /= 30;
> > +      vuln *= vuln;
> > +




__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com


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