[Freeciv-Dev] Re: (PR#2273) Server restart patch v3
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, 12 Nov 2002, Jason Short via RT wrote:
> One thing I'm not entirely happy with conceptually is that autogames
> (game.timeout==-1) will exit immediately after the game.
This is how autogames work currently, and some things depend on it, or at
least some of my scripts do... they need the ability to run multiple
autogames from an sh script supplied with slightly varied options each
time. The pitfighting script for instance dynamically rewrites the .serv
script handed to the server for each iteration.
So please don't change this. At least don't mix such an idea into the
current patch :-)
> It seems like read_init_script should be called from within the loop.
I am not sure. That means the next game would be the same as the previous
(eg if first game is civ2, next would be civ2 as well unless explicitly
changed). Maybe that is a good idea, at least for civserver. But the
problem with it is that it may not be expected by the user and may come as
a nasty surprise when starting the game, and there is no easy way to reset
the options back to default again (eg there is no "default.serv" to load
to get default options).
> Finally, it bothers me that game_init() is called at the end of the loop
> instead of the beginning. IMO it would be cleaner to call this just
> once, at the beginning of the loop. But I'm not sure if this would be
> correct - currently the game data is initialized before the network and
> other once-only initializations.
That would require also putting loading scripts and loading savegames from
command-line into the loop. The latter I am against - if you specify a
savegame on command-line you usually do not want it repeated and certainly
won't expect it to be. (If it is part of a scenario, it will use the
"load" command from a script.)
> I changed the code around slightly so that autogames could be run
> repeatedly. Then I did this. After about 5 minutes (with 20 second
> games) it crashed. I don't know if this is related to the patch (or my
> changes) at all, though.
...
> #20x080b28da in ai_data_turn_done (pplayer=0x401877c0) at aidata.c:193
...
> #70x0804d7d6 in end_turn ()
> #80x080501c6 in main_loop ()
> #90x080509a1 in srv_loop ()
No idea from me either.
- Per
- [Freeciv-Dev] Re: (PR#2273) Server restart patch v3,
Per I. Mathisen via RT <=
|
|