[Freeciv-Dev] Re: (PR#14769) helicopter looses fuel when transported on
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14769 >
Jason Short wrote:
>
>> [chrisk - Sun Dec 04 13:38:22 2005]:
>>
>>
>> SVN HEAD 04 DEC 2005 GTK2
>>
>> $SUBJECT
>
> Looking at the code it seems this should be the case in 2.0 also...
S2_0 version of the patch
- ML
diff -Nurd -X.diff_ignore freeciv/server/unittools.c freeciv/server/unittools.c
--- freeciv/server/unittools.c 2006-07-17 18:55:48.968750000 +0300
+++ freeciv/server/unittools.c 2006-07-17 19:21:32.921875000 +0300
@@ -428,9 +428,9 @@
if(is_heli_unit(punit)) {
struct city *pcity = map_get_city(punit->tile);
- if(!pcity) {
- if (!map_has_special(punit->tile, S_AIRBASE))
- punit->hp-=unit_type(punit)->hp/10;
+ if(!pcity && !map_has_special(punit->tile, S_AIRBASE)
+ && punit->transported_by == -1) {
+ punit->hp-=unit_type(punit)->hp/10;
}
}
|
|