[Freeciv-Dev] Re: (PR#12389) Helicopter crash on glacier
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12389 >
Andrew Archibald wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12389 >
>
> Hi,
>
> I was flying my helicopter over a glacier and was astonished to read that it
> had crashed "because of dangerous terrain". The docs appear to claim that
> air
> units ignore terrain, which I believed; if the helicopter had stayed over
> ocean, it would have been safe.
>
> I'm using freeciv 2.0beta8 on Linux.
Thanks for the report. This patch should fix it.
-jason
Index: common/unit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/unit.c,v
retrieving revision 1.227
diff -u -r1.227 unit.c
--- common/unit.c 10 Feb 2005 17:55:08 -0000 1.227
+++ common/unit.c 1 Mar 2005 18:00:13 -0000
@@ -1680,7 +1680,7 @@
int base_unsafe_terrain_loss_pct(const struct player *pplayer,
const struct unit *punit)
{
- return is_air_unit(punit) ? 0 : 15;
+ return (is_air_unit(punit) || is_heli_unit(punit)) ? 0 : 15;
}
/**************************************************************************
Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.322
diff -u -r1.322 unittools.c
--- server/unittools.c 23 Feb 2005 03:34:06 -0000 1.322
+++ server/unittools.c 1 Mar 2005 18:00:14 -0000
@@ -362,7 +362,7 @@
unit_name(punit->type));
}
}
- } else if ((!is_air_unit(punit))
+ } else if (!(is_air_unit(punit) || is_heli_unit(punit))
&& (myrand(100) < unit_loss_pct(pplayer,
punit->tile, punit))) {
/* All units may have a chance of dying if they are on TER_UNSAFE
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: (PR#12389) Helicopter crash on glacier,
Jason Short <=
|
|