Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#13246) It is possible to change a nation in the game l
Home

[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]
To: mstefek@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#13246) It is possible to change a nation in the game loading dialog
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 13 Jun 2005 16:12:12 -0700
Reply-to: bugs@xxxxxxxxxxx

<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;

[Prev in Thread] Current Thread [Next in Thread]