Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2001:
[Freeciv-Dev] Re: BUG: Goto is executed too early
Home

[Freeciv-Dev] Re: BUG: Goto is executed too early

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: [Freeciv-Dev] Re: BUG: Goto is executed too early
From: Reinier Post <rp@xxxxxxxxxx>
Date: Sun, 25 Feb 2001 14:24:35 +0100

On Fri, Feb 23, 2001 at 02:08:48PM +0200, Joona Kiiski wrote:
> 
> I don't know if this a bug:
> 
> You attack on enemy city and destroy the last defending unit.
> Your enemy buys new unit in the city to defend at next turn.
> 
> But if you now use goto-command (target empty city),
> you occupy city before new unit is
> created. I think that is a bug!

No, it is a feature.  Goto is executed at the server side, before
interaction from the clients is processed.  It is processed player
by player, with the players in a random order.

  http://www.freeciv.org/lxr/source/server/srv_main.c?v=cvs#L427

This will call 'AI management' on all the player's units, which
includes goto as a special case, see

  http://www.freeciv.org/lxr/source/ai/aiunit.c?v=cvs#L1803

> The order should be:
> First new stuff is built and then players (or goto functions) move units 

So you think there should be a round of city movement for all players
first, then a full round of unit management?

> This is easy to reproduce.

Definitely, it is the same as the 'my opponents perform two moves at
once' "bug".  It is a feature because it makes goto more powerful to
help neutralize differences in hetwork latency.

> --
> Zamar

-- 
Reinier



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