[Freeciv-Dev] Re: No landing on carrier (PR#773)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Friday 18 May 2001 01:34, Christian Knoke wrote:
> Am Donnerstag, 17. Mai 2001 20:46 schrieben Sie:
> > It is not possible to land a fighter
> > or a bomber on a carrier - neither,
> >
> > Christian
>
> And here is the patch.
>
> Beware, beware! This is my very first patch for
> Freeciv, having rather no experience with C, and
> first time using diff :)
>
> At least this is what I think the error is.
> Maybe its helpful.
>
> Complaints are ok if not too loud ;)
>
> Christian
The relevant code was where you changed, but the bug was in the
airunit_carrier_capacity(). This caused the statement
aircap < capacity
to be false, and the proper code was not executed.
airunit_carrier_capacity() was modified in a recent patch, but apperantly we
forgot to check all uses of it when we changed it. Duh.
On a side comment, you compare an integer with NULL. I beleive NULL is
normally used as a pointer. Just use 0 instead.
-Thue
|
|