Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] Re: (PR#4733) shuffle_players on game load?
Home

[Freeciv-Dev] Re: (PR#4733) shuffle_players on game load?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#4733) shuffle_players on game load?
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 1 Aug 2003 10:24:29 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Jason Short wrote:
> Jason Short wrote:
> 
>>When a game is saved in the middle of a turn, shuffle_players should not 
>>be called immediately.
> 
> 
> Something like this should solve it.  But this implementation is a bit 
> of a hack.

[...]

Obviously this patch is broken.

The problem is the shufled players are used both at the beginning of the 
turn and at the end.  I believe this is basically because some actions 
happen at the beginning and some at the end.

For this to work, a savegame saved in the middle of the turn should save 
the players' shuffled positions; these can then be reloaded later.  A 
better idea would be to have the shuffled positions only matter at the 
beginning OR end of the turn, not both - that way they are generated and 
then used immediately, with no possibility for a saved game in between.

The way things are currently, the player order will be different if you 
save&reload a game.  This is generally inelegant and bad - although in 
most cases it will only matter for debugging.

jason





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