Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] (PR#4760) take, observe, detach
Home

[Freeciv-Dev] (PR#4760) take, observe, detach

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#4760) take, observe, detach
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Aug 2003 19:19:12 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[kauf - Thu Aug  7 14:56:03 2003]:

> observing AI players causes the exit, where observing humans does not:

> so players observing AI do not get a tech update. Why this should
cause the
> exit is beyond me. The initial values should avoid this.

My last post explained why it caused the exit.  The exit itself is a
routine sanity check - it's possible that it is being overzealous but I
don't think so.

So the next question is why there's no tech update?  Well this one's
simple: in packhand.c:1363 the tech fields for AI players are ignored
except when the game is running or over.  This line has caused problems
before and we were never quite sure how to fix it.  So in this case the
client gets a player update but because the player is an AI and the game
state is PRE_GAME the tech fields are ignored.

This is Raimar's code (with a little help from me), revisions
1.293-1.294.  From the CVS log:

"The problem: init_tech (which marks all techs given in the ruleset
unknown, makes A_NONE and gives init techs) is only called in a new
game and if after all players chose their nations. So this leaves the
time window from the time a player connects (and this is published to
all other players) till the time this player disconnects before the
init_tech is called. In this time window the tech data is unset. This
is the problem that the previous patch should have fixed. However the
previous patch was too restrictive."

See PR#3476.  Any help on this would be appreciated.

jason



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