Complete.Org: Mailing Lists: Archives: freeciv-dev: March 1999:
Re: [Freeciv-Dev] Problem with Helicopters
Home

Re: [Freeciv-Dev] Problem with Helicopters

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: xyzzy@xxxxxxxxxxxxxxxx (Trent Piepho)
Cc: rizos@xxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Problem with Helicopters
From: Rizos Sakellariou <rizos@xxxxxxxxxxx>
Date: Tue, 2 Mar 1999 06:34:49 -0600 (CST)

> 
> On Tue, 2 Mar 1999 rizos@xxxxxxxx wrote:
> > There is a problem that occurs when a helicopter, with no hitting points 
> > left, attacks a unit that has no hitting points (eg. a diplomat). Then,
> 
> A unit with 0 hit points is dead.  A diplomat has 10 hitpoints.
> 
> My guess is that the recently changed hitpoint recovery code, which messed up
> helicopters IIRC, doesn't check if a helicopter should die due to loss of
> hitpoints.

As far as i can recall this has always been the `standard' behaviour.
I find it reasonable that helicopters die if they run out of hitpoints.
>From a quick look it seems that a check can be added where the
hp's are subtracted in unit_restore_hitpoints() at unitfunc.c :

...
  if(!pcity && (is_heli_unit(punit))) {
    punit->hp-=get_unit_type(punit->type)->hp/10;
    /* if hp <= 0  then remove helicopter, 
       send message run out of fuel */
  }
... 

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