Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
September 2005: [Freeciv-Dev] (PR#13840) more detached-player client fixes |
![]() |
[Freeciv-Dev] (PR#13840) more detached-player client fixes[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13840 > This patch adds yet more fixes for detached players receiving game packets. -jason ? diff Index: client/civclient.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v retrieving revision 1.231 diff -p -u -r1.231 civclient.c --- client/civclient.c 29 Aug 2005 13:56:49 -0000 1.231 +++ client/civclient.c 2 Sep 2005 23:32:02 -0000 @@ -508,7 +508,9 @@ void set_client_state(enum client_states load_ruleset_specific_options(); create_event(NULL, E_GAME_START, _("Game started.")); precalc_tech_data(); - update_research(game.player_ptr); + if (game.player_ptr) { + update_research(game.player_ptr); + } role_unit_precalcs(); boot_help_texts(); /* reboot */ can_slide = FALSE; Index: client/control.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/control.c,v retrieving revision 1.185 diff -p -u -r1.185 control.c --- client/control.c 25 Aug 2005 20:36:12 -0000 1.185 +++ client/control.c 2 Sep 2005 23:32:02 -0000 @@ -457,7 +457,7 @@ double blink_turn_done_button(void) static struct timer *blink_timer = NULL; const double blink_time = 0.5; /* half-second blink interval */ - if (game.player_ptr->is_connected && game.player_ptr->is_alive + if (game.player_ptr && game.player_ptr->is_alive && !game.player_ptr->phase_done) { if (!blink_timer || read_timer_seconds(blink_timer) > blink_time) { int is_waiting = 0, is_moving = 0; Index: client/options.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/options.c,v retrieving revision 1.143 diff -p -u -r1.143 options.c --- client/options.c 2 Sep 2005 22:08:51 -0000 1.143 +++ client/options.c 2 Sep 2005 23:32:03 -0000 @@ -533,10 +533,12 @@ void load_ruleset_specific_options(void) if (!section_file_load(&sf, name)) return; - /* load global worklists */ - for (i = 0; i < MAX_NUM_WORKLISTS; i++) { - worklist_load(&sf, &(game.player_ptr->worklists[i]), - "worklists.worklist%d", i); + if (game.player_ptr) { + /* load global worklists */ + for (i = 0; i < MAX_NUM_WORKLISTS; i++) { + worklist_load(&sf, &(game.player_ptr->worklists[i]), + "worklists.worklist%d", i); + } } /* Load city report columns (which include some ruleset data). */
|