Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2006:
[Freeciv-Dev] (PR#15582) airlifting bug
Home

[Freeciv-Dev] (PR#15582) airlifting bug

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jarol1@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#15582) airlifting bug
From: "Guest" <rt-guest@xxxxxxxxxxx>
Date: Fri, 17 Feb 2006 03:46:04 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15582 >

> [evyscr - Fri Feb 17 08:56:43 2006]:
> 
> On Thu, 16 Feb 2006 02:00:30 -0800
> Jaroslav Lib____k <jarol1@xxxxxxxxx> wrote:
> 
> > Hi
> > While programing a new warclient I stumbled upon a weird condition
> in unit.c > unit_can_airlift_to(); which causes a bug
> > when server allows airlifting into cities without airports as long
> as the source city has an airport.
> >
> > The code is
> > if (!punit->tile->city->airlift || !punit->tile->city->airlift) {
> > return FALSE;
> > }
> >
> > and should be
> > if (!punit->tile->city->airlift || !pcity->airlift) {
> > return FALSE;
> > }
> 
> Surely.
> 
> BTW, at common/unit.c:153 we have:
> 
>   if (punit->tile->city->owner != pcity->owner) {
>     return FALSE;
>   }
> 
> Why don't allow airlift to our allies or team?
> 
I don't know but I think it should be allowed. 

> > However lots of players use airlifting into cities with airports
> close
> > to enemy to speed up unit movements across big maps. Allowing only 1
> > airlift into city with an airport would slow down the game during
> > attacking considerably so I propose another modification:
> > unittools.c > do_airline(struct unit *punit, struct city *city2)
> >
> > remove the line  city2->airlift = FALSE;
> > to allow multiple airlifts into single city with an airport
> 
> I like the idea of multiple airlifts, but I prefer to have limited
> number of allowed airlifts rather than unlimited. In ideal (to me),
> there
> should be a value of allowed airlifts in rulesets.
> The question is how hard is to adapt AI to such changes.
> 
> 
During war the number of airlifts into target city is only limited by
the amount of airplanes available and the size of the airport. Size
limit would have to be something between 10-20 airlifts into the same
city per turn otherwise airlifts would become almost useless.



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