[Freeciv-Dev] Re: (PR#8906) save shuffled_players
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8906 >
Gregory Berkolaiko wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8906 >
>
> On Fri, 4 Jun 2004, Jason Short wrote:
>
>
>><URL: http://rt.freeciv.org/Ticket/Display.html?id=8906 >
>>
>>This patch saves and loads shuffled_players. The players are not
>>reshuffled on load. See PR#436. This should also allow a server option
>>to prevent reshuffling each turn (useful in conjunction with alternating
>>movement).
>>
>>Nonetheless a save+load of an autogame still gives different results.
>
>
> Much AI data is lost on save/load I am afraid.
Actually it looks like the problem is with the random seed. I'm not
sure if the game is entirely reseeded or if there's just a different
number of (probably AI) rand() calls when you load than there were
originally. I imagine it will be difficult or impossible to get things
to be identical.
> Anyway, your patch is a step in right direction. Is set_shuffled_players
> used more than once? I think you should kill it. Set the players as you
> load them.
This is possible but it means the shuffled players variables must be
made global (currently they are static). I preferred to just add a new
function to the interface. But I can do it the other way if you like.
Is it worth it?
jason
|
|