[Freeciv-Dev] Re: jjm: Changed old savefile default for diplomatic sta..
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> on Sun Jul 30 04:51:26 PDT 2000 = Sun Jul 30 11:51:26 2000 (GMT)
> by Jeff Mallatt <jjm@xxxxxxxxxxxx>
>
> ---- Files affected:
>
> freeciv/server plrhand.c
>
> ---- Log message:
>
> Changed old savefile default for diplomatic states from DS_NO_CONTACT to
> DS_NEUTRAL. Simple fix to keep things rational at game start.
> Fixes PR#465.
Unfortunately for sufficiently old savegames I now get this:
This is the server for Freeciv version 1.11.5-devel
You can learn a lot about Freeciv at http://www.freeciv.org/
1: Loading saved game: t2a.sav
1: Loading rulesets
civserver: ../../freeciv-cvs/common/rand.c:57: myrand: Assertion
`rand_state.is_init' failed.
Aborted (core dumped)
The problem is that myrand() gets called inside
handle_player_cancel_pact() via neutralize_ai_player() in
game_load(), and rand has not yet been initialized for savegames
which are old enough to not save rand state.
One could fix this by calling mysrand() early enough during loading
such savegames, but I'm concerned about myrand happening at this
time -- ie, during game load, and specifically for the following:
if (has_senate) {
if (myrand(GAME_MAX_REPUTATION) > pplayer->reputation) {
notify_player(pplayer, _("Game: The senate decides to dissolve "
"rather than support your actions any longer."));
handle_player_revolution(pplayer);
}
}
That is, shouldn't get a chance of revolution just by loading
savegame! (In fact shouldn't call myrand() just from loading.)
Its unclear to me whether this may also be a problem (just less
obvious) for other (ie recent) savegames, and/or with
neutralize_ai_player() in general...
-- David
- [Freeciv-Dev] Re: jjm: Changed old savefile default for diplomatic sta...,
David Pfitzner <=
|
|