[Freeciv-Dev] (PR#13131) bugs when loading a savegame
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: |
[Freeciv-Dev] (PR#13131) bugs when loading a savegame |
From: |
"Jason Dorje Short" <jdorje@xxxxxxxxx> |
Date: |
Tue, 17 May 2005 18:23:07 -0700 |
Reply-to: |
bugs@xxxxxxxxxxx |
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13131 >
This patch fixes two recently-introduced bugs when loading a savegame.
1. In the pregame-nations patch, the nation selection state was
removed. However I *believe* this breaks savegame compatibility because
of the reordering of the enum (the game.server_state value in the
savegame). So I added back in an unused placeholder. However the only
way this could ever be removed is by adding some sort of upgrading path
in savegame.c (with an optional capability for a while). So maybe this
should be done (and in a couple of releases the optional capability can
be made manditory).
2. In the government-effects patch (I think) some initializing code was
added which incorrectly initializes governments when loading a game,
thus always putting you back into despotism. This is the cause of some
confusion in PR#13043 (but is not the cause of the bug in the
screenshot, I think). Also for some reason the function is called
final_ruleset_adjustments even though it's not particularly ruleset
related. It should probably be moved in with nation initialization in
generate_players.
-jason
Index: common/capstr.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/capstr.c,v
retrieving revision 1.247
diff -u -r1.247 capstr.c
--- common/capstr.c 11 May 2005 20:03:08 -0000 1.247
+++ common/capstr.c 18 May 2005 01:16:54 -0000
@@ -82,7 +82,7 @@
* as long as possible. We want to maintain network compatibility with
* the stable branch for as long as possible.
*/
-#define CAPABILITY "+Freeciv.Devel.2005.May.11-2"
+#define CAPABILITY "+Freeciv.Devel.2005.May.17"
void init_our_capability(void)
{
Index: common/game.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/game.h,v
retrieving revision 1.191
diff -u -r1.191 game.h
--- common/game.h 10 May 2005 17:27:09 -0000 1.191
+++ common/game.h 18 May 2005 01:16:54 -0000
@@ -31,6 +31,7 @@
enum server_states {
PRE_GAME_STATE,
+ UNUSED_STATE, /* Have to keep this around for savegame compatibility. */
RUN_GAME_STATE,
GAME_OVER_STATE
};
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.260
diff -u -r1.260 srv_main.c
--- server/srv_main.c 10 May 2005 01:03:03 -0000 1.260
+++ server/srv_main.c 18 May 2005 01:16:55 -0000
@@ -1787,8 +1787,8 @@
if (game.is_new_game) {
generate_players();
+ final_ruleset_adjustments();
}
- final_ruleset_adjustments();
/* If we have a tile map, and map.generator==0, call map_fractal_generate
* anyway to make the specials, huts and continent numbers. */
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.409
diff -u -r1.409 stdinhand.c
--- server/stdinhand.c 7 May 2005 05:52:26 -0000 1.409
+++ server/stdinhand.c 18 May 2005 01:16:56 -0000
@@ -3641,6 +3641,7 @@
"to disconnect."));
return FALSE;
case RUN_GAME_STATE:
+ case UNUSED_STATE:
/* TRANS: given when /start is invoked while the game is running. */
cmd_reply(CMD_START_GAME, caller, C_FAIL,
_("Cannot start the game: it is already running."));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#13131) bugs when loading a savegame,
Jason Dorje Short <=
|
|