[Freeciv-Dev] (PR#12377) bug: "end turn" greys out and never comes back
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12377 >
Problem is the turn-done-button is updated when the new-phase packet is
received. However this button depends on the value of
pplayer->phase_done which is only updated when a player packet is
received. And receiving a player packet does not trigger a
turn-done-button update.
There are lots of ways this could be fixed. Perhaps the easiest and
ugliest is just to set pplayer->phase_done when a new-phase packet is
received.
-jason
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.476
diff -u -r1.476 packhand.c
--- client/packhand.c 5 Mar 2005 23:51:05 -0000 1.476
+++ client/packhand.c 14 Mar 2005 22:42:19 -0000
@@ -818,6 +818,10 @@
game.phase = phase;
if (is_player_phase(game.player_ptr, phase)) {
+ /* HACK: this is updated by the player packet too; we update it here
+ * so the turn done button state will be set properly. */
+ game.player_ptr->phase_done = FALSE;
+
agents_start_turn();
non_ai_unit_focus = FALSE;
|
|