<URL: http://bugs.freeciv.org/Ticket/Display.html?id=19204 >

> [cproc - Fr 04. Aug 2006, 04:55:12]:
> 
> in clinet.c line 120:
> 
> if (!with_ggz) {
>   set_client_page(in_ggz ? PAGE_GGZ : PAGE_MAIN);
> }
> 
> reports_force_thaw();
> 
> set_client_state(CLIENT_PRE_GAME_STATE);
> 
> -----
> 
> the set_client_state() function calls set_client_page(), too, so the
> call in clinet.c is not really necessary, is it?
> 

Sorry, I must reopen this ticket, because there indeed is a case when
the call is needed: when you disconnect from the start page, the client
is still in CLIENT_PRE_GAME_STATE and then
set_client_page(CLIENT_PRE_GAME_STATE) skips the part where the page is
changed. The attached patch brings the call back, but with a check if
the client is in CLIENT_PRE_GAME_STATE to avoid the double call when
disconnecting from a running game.

Index: client/clinet.c
===================================================================
--- client/clinet.c	(Revision 12383)
+++ client/clinet.c	(Arbeitskopie)
@@ -118,6 +118,12 @@
   popdown_races_dialog(); 
   close_connection_dialog();
 
+  if (get_client_state() == CLIENT_PRE_GAME_STATE) {
+    if (!with_ggz) {
+      set_client_page(in_ggz ? PAGE_GGZ : PAGE_MAIN);
+    }
+  }
+
   reports_force_thaw();
   
   set_client_state(CLIENT_PRE_GAME_STATE);
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to