[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 >
On Fri, 4 Jun 2004, Jason Short wrote:
> 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.
yes
> > 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?
Ah, I see. No, definitely not worth it. Although you could make a
smaller function set_shuffled_player to set just one player and call it in
the loop, I think this is worth it. And definitely write in the header of
the function that it is essentially an accessor to the static variables.
G.
|
|