Re: [Freeciv-Dev] Problem with Helicopters
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
>
> 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 */
}
...
|
|