[Freeciv-Dev] (PR#13202) client game data is inaccurate during pregame
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: |
[Freeciv-Dev] (PR#13202) client game data is inaccurate during pregame |
From: |
"Jason Dorje Short" <jdorje@xxxxxxxxx> |
Date: |
Tue, 31 May 2005 23:21:58 -0700 |
Reply-to: |
bugs@xxxxxxxxxxx |
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13202 >
If you try to do anything "tricky" like /take, /detach, /create,
/remove, /aitoggle in pregame, the client's data isn't updated properly.
The server doesn't send updates for most such actions. This means the
pregame players dialog can't work properly.
Fixing this seems to be obnoxious. Fixing one bug can reveal another
since sending one update may make things worse unless the following
updates are also sent. The attached patch fixes several problems here
but in the end only makes things worse.
Several specific issues:
1. On a player-remove packet the conn list has to be updated. The
client part of this patch does that and should be committed.
2. All updates are sent to NULL which is game.game_connections which
doesn't include detached connections. This patch changes that to
game.est_connections which lets non-attached conns see the list of
players as well. However this part is buggy; I don't know why.
-jason
Index: client/climisc.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/climisc.c,v
retrieving revision 1.165
diff -u -r1.165 climisc.c
--- client/climisc.c 5 May 2005 18:32:46 -0000 1.165
+++ client/climisc.c 1 Jun 2005 06:19:02 -0000
@@ -45,6 +45,7 @@
#include "clinet.h"
#include "control.h"
#include "dialogs_g.h"
+#include "gui_main_g.h"
#include "mapview_g.h"
#include "messagewin_common.h"
#include "packhand.h"
@@ -61,6 +62,7 @@
{
game_remove_player(get_player(plrno));
game_renumber_players(plrno);
+ update_conn_list_dialog();
}
/**************************************************************************
Index: server/gamehand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/gamehand.c,v
retrieving revision 1.163
diff -u -r1.163 gamehand.c
--- server/gamehand.c 5 May 2005 18:32:52 -0000 1.163
+++ server/gamehand.c 1 Jun 2005 06:19:03 -0000
@@ -332,7 +332,7 @@
struct packet_game_info ginfo;
if (!dest) {
- dest = game.game_connections;
+ dest = game.est_connections;
}
ginfo = game.info;
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.383
diff -u -r1.383 plrhand.c
--- server/plrhand.c 1 Jun 2005 01:02:34 -0000 1.383
+++ server/plrhand.c 1 Jun 2005 06:19:03 -0000
@@ -1437,7 +1437,7 @@
**************************************************************************/
void send_player_info(struct player *src, struct player *dest)
{
- send_player_info_c(src, (dest ? dest->connections : game.game_connections));
+ send_player_info_c(src, (dest ? dest->connections : game.est_connections));
}
/**************************************************************************
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.265
diff -u -r1.265 srv_main.c
--- server/srv_main.c 1 Jun 2005 01:02:34 -0000 1.265
+++ server/srv_main.c 1 Jun 2005 06:19:04 -0000
@@ -474,7 +474,7 @@
} else {
game.info.num_phases = game.info.nplayers;
}
- send_game_info(game.game_connections);
+ send_game_info(NULL);
if (is_new_turn) {
script_signal_emit("turn_started", 2,
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.415
diff -u -r1.415 stdinhand.c
--- server/stdinhand.c 1 Jun 2005 01:02:34 -0000 1.415
+++ server/stdinhand.c 1 Jun 2005 06:19:04 -0000
@@ -803,8 +803,8 @@
cancel_all_meetings(pplayer);
}
+ send_player_info(pplayer, NULL);
if (server_state == RUN_GAME_STATE) {
- send_player_info(pplayer, NULL);
gamelog(GAMELOG_PLAYER, pplayer);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#13202) client game data is inaccurate during pregame,
Jason Dorje Short <=
|
|