[Freeciv-Dev] (PR#13246) It is possible to change a nation in the game l
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13246 >
> [mstefek - Fri Jun 10 09:11:37 2005]:
>
> when the game has already been started, the same with teams.
This is a real bear.
There are a bunch of bugs here.
1. /team can be run even when !game.is_new_game.
2. Nations can be changed even when !game.is_new_game.
3. Both #1 and #2 also show up in the client pregame dialog. This
requires a separate game.is_new_game check. However game.is_new_game
isn't known at the client.
Bug #1 is present in 2.0 also. This patch fixes it. Fixing all three
requires a bit more hacking (patch will follow).
-jason
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.354.2.35
diff -u -r1.354.2.35 stdinhand.c
--- server/stdinhand.c 26 May 2005 04:49:33 -0000 1.354.2.35
+++ server/stdinhand.c 13 Jun 2005 23:11:33 -0000
@@ -2060,7 +2060,7 @@
int ntokens = 0, i;
bool res = FALSE;
- if (server_state != PRE_GAME_STATE) {
+ if (server_state != PRE_GAME_STATE || !game.is_new_game) {
cmd_reply(CMD_TEAM, caller, C_SYNTAX,
_("Cannot change teams once game has begun."));
return FALSE;
|
|