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

[Freeciv-Dev] Re: (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] Re: (PR#15582) airlifting bug
From: "Egor Vyscrebentsov" <evyscr@xxxxxxxxx>
Date: Fri, 17 Feb 2006 00:56:43 -0800
Reply-to: bugs@xxxxxxxxxxx

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

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?

> 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.

-- 
Thanks, evyscr





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