[Freeciv-Dev] (PR#12985) don't reread rulesets for no reason
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12985 >
In this patch if /rulesetdir is run and the ruleset isn't changed, it
isn't reread.
A similar change would be desirable for savegame loading. However this
doesn't seem possible without additional fixes since the ruleset data
has already been freed right before the load. Basically this means any
load always has to load the ruleset data twice for now.
-jason
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.404
diff -u -r1.404 stdinhand.c
--- server/stdinhand.c 3 May 2005 20:08:25 -0000 1.404
+++ server/stdinhand.c 4 May 2005 20:51:31 -0000
@@ -3222,6 +3222,11 @@
return FALSE;
}
if (!check) {
+ if (strcmp(str, game.rulesetdir) == 0) {
+ cmd_reply(CMD_RULESETDIR, caller, C_OK,
+ _("Ruleset directory is already \"%s\""), str);
+ return TRUE;
+ }
cmd_reply(CMD_RULESETDIR, caller, C_OK,
_("Ruleset directory set to \"%s\""), str);
sz_strlcpy(game.rulesetdir, str);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#12985) don't reread rulesets for no reason,
Jason Short <=
|
|