[Freeciv-commits] r27913 - in /branches/S2_6/server: commands.c commands.h stdinhand.c
Author: cazfi Date: Sat Jan 31 10:06:29 2015 New Revision: 27913 URL: http://svn.gna.org/viewcvs/freeciv?rev=27913view=rev Log: Made /scensave command available in release builds. See patch #5755 Modified: branches/S2_6/server/commands.c branches/S2_6/server/commands.h branches/S2_6/server/stdinhand.c Modified: branches/S2_6/server/commands.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/commands.c?rev=27913r1=27912r2=27913view=diff == --- branches/S2_6/server/commands.c (original) +++ branches/S2_6/server/commands.c Sat Jan 31 10:06:29 2015 @@ -561,7 +561,6 @@ and use the 'start' command once players have reconnected.), NULL, CMD_ECHO_ADMINS, VCF_NONE, 0 }, -#ifdef DEBUG {scensave, ALLOW_ADMIN, /* TRANS: translate text between only */ N_(scensave\n @@ -575,7 +574,6 @@ and use the 'start' command once players have reconnected.), NULL, CMD_ECHO_ADMINS, VCF_NONE, 0 }, -#endif /* DEBUG */ {load, ALLOW_CTRL, /* TRANS: translate text between only */ N_(load\n Modified: branches/S2_6/server/commands.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/commands.h?rev=27913r1=27912r2=27913view=diff == --- branches/S2_6/server/commands.h (original) +++ branches/S2_6/server/commands.h Sat Jan 31 10:06:29 2015 @@ -83,9 +83,7 @@ CMD_SURRENDER, /* not really harmful, info level */ CMD_REMOVE, CMD_SAVE, -#ifdef DEBUG CMD_SCENSAVE, -#endif CMD_LOAD, CMD_READ_SCRIPT, CMD_WRITE_SCRIPT, Modified: branches/S2_6/server/stdinhand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/stdinhand.c?rev=27913r1=27912r2=27913view=diff == --- branches/S2_6/server/stdinhand.c(original) +++ branches/S2_6/server/stdinhand.cSat Jan 31 10:06:29 2015 @@ -648,7 +648,6 @@ For command scensave foo; Save the game, with filename=arg, provided server state is ok. **/ -#ifdef DEBUG static bool scensave_command(struct connection *caller, char *arg, bool check) { if (is_restricted(caller)) { @@ -661,7 +660,6 @@ } return TRUE; } -#endif /* DEBUG */ /** Handle ai player ai toggling. @@ -4218,10 +4216,8 @@ return remove_player_command(caller, arg, check); case CMD_SAVE: return save_command(caller, arg, check); -#ifdef DEBUG case CMD_SCENSAVE: return scensave_command(caller, arg, check); -#endif case CMD_LOAD: return load_command(caller, arg, check); case CMD_METAPATCHES: ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r27912 - in /trunk/server: commands.c commands.h stdinhand.c
Author: cazfi Date: Sat Jan 31 10:06:21 2015 New Revision: 27912 URL: http://svn.gna.org/viewcvs/freeciv?rev=27912view=rev Log: Made /scensave command available in release builds. See patch #5755 Modified: trunk/server/commands.c trunk/server/commands.h trunk/server/stdinhand.c Modified: trunk/server/commands.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/commands.c?rev=27912r1=27911r2=27912view=diff == --- trunk/server/commands.c (original) +++ trunk/server/commands.c Sat Jan 31 10:06:21 2015 @@ -561,7 +561,6 @@ and use the 'start' command once players have reconnected.), NULL, CMD_ECHO_ADMINS, VCF_NONE, 0 }, -#ifdef DEBUG {scensave, ALLOW_ADMIN, /* TRANS: translate text between only */ N_(scensave\n @@ -575,7 +574,6 @@ and use the 'start' command once players have reconnected.), NULL, CMD_ECHO_ADMINS, VCF_NONE, 0 }, -#endif /* DEBUG */ {load, ALLOW_CTRL, /* TRANS: translate text between only */ N_(load\n Modified: trunk/server/commands.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/commands.h?rev=27912r1=27911r2=27912view=diff == --- trunk/server/commands.h (original) +++ trunk/server/commands.h Sat Jan 31 10:06:21 2015 @@ -83,9 +83,7 @@ CMD_SURRENDER, /* not really harmful, info level */ CMD_REMOVE, CMD_SAVE, -#ifdef DEBUG CMD_SCENSAVE, -#endif CMD_LOAD, CMD_READ_SCRIPT, CMD_WRITE_SCRIPT, Modified: trunk/server/stdinhand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/stdinhand.c?rev=27912r1=27911r2=27912view=diff == --- trunk/server/stdinhand.c(original) +++ trunk/server/stdinhand.cSat Jan 31 10:06:21 2015 @@ -648,7 +648,6 @@ For command scensave foo; Save the game, with filename=arg, provided server state is ok. **/ -#ifdef DEBUG static bool scensave_command(struct connection *caller, char *arg, bool check) { if (is_restricted(caller)) { @@ -661,7 +660,6 @@ } return TRUE; } -#endif /* DEBUG */ /** Handle ai player ai toggling. @@ -4218,10 +4216,8 @@ return remove_player_command(caller, arg, check); case CMD_SAVE: return save_command(caller, arg, check); -#ifdef DEBUG case CMD_SCENSAVE: return scensave_command(caller, arg, check); -#endif case CMD_LOAD: return load_command(caller, arg, check); case CMD_METAPATCHES: ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r27914 - in /trunk/server: srv_log.c srv_log.h srv_main.c
Author: cazfi Date: Sat Jan 31 10:11:55 2015 New Revision: 27914 URL: http://svn.gna.org/viewcvs/freeciv?rev=27914view=rev Log: Free timing logs on server exit See patch #5749 Modified: trunk/server/srv_log.c trunk/server/srv_log.h trunk/server/srv_main.c Modified: trunk/server/srv_log.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/srv_log.c?rev=27914r1=27913r2=27914view=diff == --- trunk/server/srv_log.c (original) +++ trunk/server/srv_log.c Sat Jan 31 10:11:55 2015 @@ -127,17 +127,10 @@ void timing_log_real(enum ai_timer timer, enum ai_timer_activity activity) { static int turn = -1; - int i; - - if (turn == -1) { -for (i = 0; i AIT_LAST; i++) { - aitimer[i][0] = timer_new(TIMER_CPU, TIMER_ACTIVE); - aitimer[i][1] = timer_new(TIMER_CPU, TIMER_ACTIVE); - recursion[i] = 0; -} - } if (game.info.turn != turn) { +int i; + turn = game.info.turn; for (i = 0; i AIT_LAST; i++) { timer_clear(aitimer[i][0]); @@ -216,3 +209,30 @@ AILOG_OUT(Citizen arrange, AIT_CITIZEN_ARRANGE); AILOG_OUT(Tech, AIT_TECH); } + +/** + Initialize AI timing system +**/ +void timing_log_init(void) +{ + int i; + + for (i = 0; i AIT_LAST; i++) { +aitimer[i][0] = timer_new(TIMER_CPU, TIMER_ACTIVE); +aitimer[i][1] = timer_new(TIMER_CPU, TIMER_ACTIVE); +recursion[i] = 0; + } +} + +/** + Free AI timing system resources +**/ +void timing_log_free(void) +{ + int i; + + for (i = 0; i AIT_LAST; i++) { +timer_destroy(aitimer[i][0]); +timer_destroy(aitimer[i][1]); + } +} Modified: trunk/server/srv_log.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/srv_log.h?rev=27914r1=27913r2=27914view=diff == --- trunk/server/srv_log.h (original) +++ trunk/server/srv_log.h Sat Jan 31 10:11:55 2015 @@ -112,6 +112,9 @@ } \ } +void timing_log_init(void); +void timing_log_free(void); + void timing_log_real(enum ai_timer timer, enum ai_timer_activity activity); void timing_results_real(void); Modified: trunk/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/srv_main.c?rev=27914r1=27913r2=27914view=diff == --- trunk/server/srv_main.c (original) +++ trunk/server/srv_main.c Sat Jan 31 10:11:55 2015 @@ -117,6 +117,7 @@ #include sernet.h #include settings.h #include spacerace.h +#include srv_log.h #include stdinhand.h #include techtools.h #include unithand.h @@ -213,6 +214,9 @@ /* This is before ai module initializations so that if ai module * wants to use registry files, it can. */ registry_module_init(); + + /* We want this before any AI stuff */ + timing_log_init(); /* This must be before command line argument parsing. This allocates default ai, and we want that to take place before @@ -1590,6 +1594,7 @@ voting_free(); close_connections_and_socket(); rulesets_deinit(); + timing_log_free(); registry_module_close(); fc_destroy_mutex(game.server.mutexes.city_list); free_nls(); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r27916 - in /branches/S2_5/server: srv_log.c srv_log.h srv_main.c
Author: cazfi Date: Sat Jan 31 10:12:10 2015 New Revision: 27916 URL: http://svn.gna.org/viewcvs/freeciv?rev=27916view=rev Log: Free timing logs on server exit See patch #5749 Modified: branches/S2_5/server/srv_log.c branches/S2_5/server/srv_log.h branches/S2_5/server/srv_main.c Modified: branches/S2_5/server/srv_log.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/srv_log.c?rev=27916r1=27915r2=27916view=diff == --- branches/S2_5/server/srv_log.c (original) +++ branches/S2_5/server/srv_log.c Sat Jan 31 10:12:10 2015 @@ -159,17 +159,10 @@ void timing_log_real(enum ai_timer timer, enum ai_timer_activity activity) { static int turn = -1; - int i; - - if (turn == -1) { -for (i = 0; i AIT_LAST; i++) { - aitimer[i][0] = timer_new(TIMER_CPU, TIMER_ACTIVE); - aitimer[i][1] = timer_new(TIMER_CPU, TIMER_ACTIVE); - recursion[i] = 0; -} - } if (game.info.turn != turn) { +int i; + turn = game.info.turn; for (i = 0; i AIT_LAST; i++) { timer_clear(aitimer[i][0]); @@ -248,3 +241,30 @@ AILOG_OUT(Citizen arrange, AIT_CITIZEN_ARRANGE); AILOG_OUT(Tech, AIT_TECH); } + +/** + Initialize AI timing system +**/ +void timing_log_init(void) +{ + int i; + + for (i = 0; i AIT_LAST; i++) { +aitimer[i][0] = timer_new(TIMER_CPU, TIMER_ACTIVE); +aitimer[i][1] = timer_new(TIMER_CPU, TIMER_ACTIVE); +recursion[i] = 0; + } +} + +/** + Free AI timing system resources +**/ +void timing_log_free(void) +{ + int i; + + for (i = 0; i AIT_LAST; i++) { +timer_destroy(aitimer[i][0]); +timer_destroy(aitimer[i][1]); + } +} Modified: branches/S2_5/server/srv_log.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/srv_log.h?rev=27916r1=27915r2=27916view=diff == --- branches/S2_5/server/srv_log.h (original) +++ branches/S2_5/server/srv_log.h Sat Jan 31 10:12:10 2015 @@ -129,6 +129,9 @@ } \ } +void timing_log_init(void); +void timing_log_free(void); + void timing_log_real(enum ai_timer timer, enum ai_timer_activity activity); void timing_results_real(void); Modified: branches/S2_5/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/srv_main.c?rev=27916r1=27915r2=27916view=diff == --- branches/S2_5/server/srv_main.c (original) +++ branches/S2_5/server/srv_main.c Sat Jan 31 10:12:10 2015 @@ -114,6 +114,7 @@ #include sernet.h #include settings.h #include spacerace.h +#include srv_log.h #include stdinhand.h #include techtools.h #include unithand.h @@ -206,6 +207,9 @@ /* This is before ai module initializations so that if ai module * wants to use registry files, it can. */ registry_module_init(); + + /* We want this before any AI stuff */ + timing_log_init(); /* This must be before command line argument parsing. This allocates default ai, and we want that to take place before @@ -1410,6 +1414,7 @@ voting_free(); close_connections_and_socket(); rulesets_deinit(); + timing_log_free(); registry_module_close(); fc_destroy_mutex(game.server.mutexes.city_list); free_nls(); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r27915 - in /branches/S2_6/server: srv_log.c srv_log.h srv_main.c
Author: cazfi Date: Sat Jan 31 10:12:02 2015 New Revision: 27915 URL: http://svn.gna.org/viewcvs/freeciv?rev=27915view=rev Log: Free timing logs on server exit See patch #5749 Modified: branches/S2_6/server/srv_log.c branches/S2_6/server/srv_log.h branches/S2_6/server/srv_main.c Modified: branches/S2_6/server/srv_log.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_log.c?rev=27915r1=27914r2=27915view=diff == --- branches/S2_6/server/srv_log.c (original) +++ branches/S2_6/server/srv_log.c Sat Jan 31 10:12:02 2015 @@ -127,17 +127,10 @@ void timing_log_real(enum ai_timer timer, enum ai_timer_activity activity) { static int turn = -1; - int i; - - if (turn == -1) { -for (i = 0; i AIT_LAST; i++) { - aitimer[i][0] = timer_new(TIMER_CPU, TIMER_ACTIVE); - aitimer[i][1] = timer_new(TIMER_CPU, TIMER_ACTIVE); - recursion[i] = 0; -} - } if (game.info.turn != turn) { +int i; + turn = game.info.turn; for (i = 0; i AIT_LAST; i++) { timer_clear(aitimer[i][0]); @@ -216,3 +209,30 @@ AILOG_OUT(Citizen arrange, AIT_CITIZEN_ARRANGE); AILOG_OUT(Tech, AIT_TECH); } + +/** + Initialize AI timing system +**/ +void timing_log_init(void) +{ + int i; + + for (i = 0; i AIT_LAST; i++) { +aitimer[i][0] = timer_new(TIMER_CPU, TIMER_ACTIVE); +aitimer[i][1] = timer_new(TIMER_CPU, TIMER_ACTIVE); +recursion[i] = 0; + } +} + +/** + Free AI timing system resources +**/ +void timing_log_free(void) +{ + int i; + + for (i = 0; i AIT_LAST; i++) { +timer_destroy(aitimer[i][0]); +timer_destroy(aitimer[i][1]); + } +} Modified: branches/S2_6/server/srv_log.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_log.h?rev=27915r1=27914r2=27915view=diff == --- branches/S2_6/server/srv_log.h (original) +++ branches/S2_6/server/srv_log.h Sat Jan 31 10:12:02 2015 @@ -112,6 +112,9 @@ } \ } +void timing_log_init(void); +void timing_log_free(void); + void timing_log_real(enum ai_timer timer, enum ai_timer_activity activity); void timing_results_real(void); Modified: branches/S2_6/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_main.c?rev=27915r1=27914r2=27915view=diff == --- branches/S2_6/server/srv_main.c (original) +++ branches/S2_6/server/srv_main.c Sat Jan 31 10:12:02 2015 @@ -117,6 +117,7 @@ #include sernet.h #include settings.h #include spacerace.h +#include srv_log.h #include stdinhand.h #include techtools.h #include unithand.h @@ -213,6 +214,9 @@ /* This is before ai module initializations so that if ai module * wants to use registry files, it can. */ registry_module_init(); + + /* We want this before any AI stuff */ + timing_log_init(); /* This must be before command line argument parsing. This allocates default ai, and we want that to take place before @@ -1535,6 +1539,7 @@ voting_free(); close_connections_and_socket(); rulesets_deinit(); + timing_log_free(); registry_module_close(); fc_destroy_mutex(game.server.mutexes.city_list); free_nls(); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r27918 - in /branches/S2_6/client: gui-sdl/diplodlg.c gui-sdl2/diplodlg.c
Author: cazfi Date: Sun Feb 1 06:50:30 2015 New Revision: 27918 URL: http://svn.gna.org/viewcvs/freeciv?rev=27918view=rev Log: Made it possible to Withdraw Vision from someone you're at war with in sdl-clients See bug #23210 Modified: branches/S2_6/client/gui-sdl/diplodlg.c branches/S2_6/client/gui-sdl2/diplodlg.c Modified: branches/S2_6/client/gui-sdl/diplodlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-sdl/diplodlg.c?rev=27918r1=27917r2=27918view=diff == --- branches/S2_6/client/gui-sdl/diplodlg.c (original) +++ branches/S2_6/client/gui-sdl/diplodlg.c Sun Feb 1 06:50:30 2015 @@ -1489,8 +1489,9 @@ SDL_String16 *pStr; SDL_Surface *pText; SDL_Rect dst; -bool shared = FALSE; +bool shared; SDL_Rect area; +int buttons = 0; if (pSDip_Dlg) { return; @@ -1532,18 +1533,17 @@ FREESTRING16(pStr); area.w = MAX(area.w , pText-w); area.h += pText-h + adj_size(15); - -if(type != DS_WAR can_client_issue_orders()) { - - if(type == DS_ARMISTICE) { - fc_snprintf(cBuf, sizeof(cBuf), _(Declare WAR)); + +if (type != DS_WAR can_client_issue_orders()) { + if (type == DS_ARMISTICE) { +fc_snprintf(cBuf, sizeof(cBuf), _(Declare WAR)); } else { - fc_snprintf(cBuf, sizeof(cBuf), _(Cancel Treaty)); +fc_snprintf(cBuf, sizeof(cBuf), _(Cancel Treaty)); } - + /* cancel treaty */ pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, - pWindow-dst, cBuf, adj_font(12), 0); +pWindow-dst, cBuf, adj_font(12), 0); pBuf-action = cancel_pact_dlg_callback; set_wstate(pBuf, FC_WS_NORMAL); @@ -1555,27 +1555,29 @@ pBuf-next-size.w = pBuf-size.w; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); - - shared = gives_shared_vision(client.conn.playing, pPlayer); - - if(shared) { -/* shared vision */ -pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, pWindow-dst, - _(Withdraw vision), adj_font(12), 0); - -pBuf-action = withdraw_vision_dlg_callback; -set_wstate(pBuf, FC_WS_NORMAL); -pBuf-data.player = pPlayer; -pBuf-key = SDLK_w; - pBuf-string16-fgcol = *get_theme_color(COLOR_THEME_DIPLODLG_MEETING_TEXT); -add_to_gui_list(ID_BUTTON, pBuf); -pBuf-size.w = MAX(pBuf-next-size.w, pBuf-size.w); -pBuf-next-size.w = pBuf-size.w; -button_w = MAX(button_w , pBuf-size.w); -button_h = MAX(button_h , pBuf-size.h); - } -} - + buttons++; +} + +shared = gives_shared_vision(client.conn.playing, pPlayer); + +if (shared) { + /* shared vision */ + pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, pWindow-dst, +_(Withdraw vision), adj_font(12), 0); + + pBuf-action = withdraw_vision_dlg_callback; + set_wstate(pBuf, FC_WS_NORMAL); + pBuf-data.player = pPlayer; + pBuf-key = SDLK_w; + pBuf-string16-fgcol = *get_theme_color(COLOR_THEME_DIPLODLG_MEETING_TEXT); + add_to_gui_list(ID_BUTTON, pBuf); + pBuf-size.w = MAX(pBuf-next-size.w, pBuf-size.w); + pBuf-next-size.w = pBuf-size.w; + button_w = MAX(button_w , pBuf-size.w); + button_h = MAX(button_h , pBuf-size.h); + buttons++; +} + /* meet */ pBuf = create_themeicon_button_from_chars(pTheme-PLAYERS_Icon, pWindow-dst, _(Call Diplomatic Meeting), adj_font(12), 0); @@ -1590,6 +1592,7 @@ pBuf-next-size.w = pBuf-size.w; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); +buttons++; pBuf = create_themeicon_button_from_chars(pTheme-CANCEL_Icon, pWindow-dst, _(Send him back), adj_font(12), 0); @@ -1600,20 +1603,13 @@ pBuf-key = SDLK_ESCAPE; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); - +buttons++; + button_h += adj_size(4); area.w = MAX(area.w, button_w + adj_size(20)); - -if(type != DS_WAR) { - if(shared) { - area.h += 4 * (button_h + adj_size(10)); - } else { -area.h += 3 * (button_h + adj_size(10)); - } -} else { - area.h += 2 * (button_h + adj_size(10)); -} - + +area.h += buttons * (button_h + adj_size(10)); + add_to_gui_list(ID_BUTTON, pBuf); @@ -1646,23 +1642,23 @@ pBuf = pWindow; -if(type != DS_WAR) { - /* cancel treaty */ +/* war: meet, peace: cancel treaty */ +pBuf = pBuf-prev; +pBuf-size.w = button_w; +pBuf-size.h = button_h; +pBuf-size.x = area.x + (area.w -
[Freeciv-commits] r27919 - /branches/S2_5/client/gui-sdl/diplodlg.c
Author: cazfi Date: Sun Feb 1 06:50:39 2015 New Revision: 27919 URL: http://svn.gna.org/viewcvs/freeciv?rev=27919view=rev Log: Made it possible to Withdraw Vision from someone you're at war with in sdl-clients See bug #23210 Modified: branches/S2_5/client/gui-sdl/diplodlg.c Modified: branches/S2_5/client/gui-sdl/diplodlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-sdl/diplodlg.c?rev=27919r1=27918r2=27919view=diff == --- branches/S2_5/client/gui-sdl/diplodlg.c (original) +++ branches/S2_5/client/gui-sdl/diplodlg.c Sun Feb 1 06:50:39 2015 @@ -1481,8 +1481,9 @@ SDL_String16 *pStr; SDL_Surface *pText; SDL_Rect dst; -bool shared = FALSE; +bool shared; SDL_Rect area; +int buttons = 0; if (pSDip_Dlg) { return; @@ -1524,18 +1525,17 @@ FREESTRING16(pStr); area.w = MAX(area.w , pText-w); area.h += pText-h + adj_size(15); - -if(type != DS_WAR can_client_issue_orders()) { - - if(type == DS_ARMISTICE) { - fc_snprintf(cBuf, sizeof(cBuf), _(Declare WAR)); + +if (type != DS_WAR can_client_issue_orders()) { + if (type == DS_ARMISTICE) { +fc_snprintf(cBuf, sizeof(cBuf), _(Declare WAR)); } else { - fc_snprintf(cBuf, sizeof(cBuf), _(Cancel Treaty)); +fc_snprintf(cBuf, sizeof(cBuf), _(Cancel Treaty)); } - + /* cancel treaty */ pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, - pWindow-dst, cBuf, adj_font(12), 0); +pWindow-dst, cBuf, adj_font(12), 0); pBuf-action = cancel_pact_dlg_callback; set_wstate(pBuf, FC_WS_NORMAL); @@ -1547,27 +1547,29 @@ pBuf-next-size.w = pBuf-size.w; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); - - shared = gives_shared_vision(client.conn.playing, pPlayer); - - if(shared) { -/* shared vision */ -pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, pWindow-dst, - _(Withdraw vision), adj_font(12), 0); - -pBuf-action = withdraw_vision_dlg_callback; -set_wstate(pBuf, FC_WS_NORMAL); -pBuf-data.player = pPlayer; -pBuf-key = SDLK_w; - pBuf-string16-fgcol = *get_theme_color(COLOR_THEME_DIPLODLG_MEETING_TEXT); -add_to_gui_list(ID_BUTTON, pBuf); -pBuf-size.w = MAX(pBuf-next-size.w, pBuf-size.w); -pBuf-next-size.w = pBuf-size.w; -button_w = MAX(button_w , pBuf-size.w); -button_h = MAX(button_h , pBuf-size.h); - } -} - + buttons++; +} + +shared = gives_shared_vision(client.conn.playing, pPlayer); + +if (shared) { + /* shared vision */ + pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, pWindow-dst, +_(Withdraw vision), adj_font(12), 0); + + pBuf-action = withdraw_vision_dlg_callback; + set_wstate(pBuf, FC_WS_NORMAL); + pBuf-data.player = pPlayer; + pBuf-key = SDLK_w; + pBuf-string16-fgcol = *get_theme_color(COLOR_THEME_DIPLODLG_MEETING_TEXT); + add_to_gui_list(ID_BUTTON, pBuf); + pBuf-size.w = MAX(pBuf-next-size.w, pBuf-size.w); + pBuf-next-size.w = pBuf-size.w; + button_w = MAX(button_w , pBuf-size.w); + button_h = MAX(button_h , pBuf-size.h); + buttons++; +} + /* meet */ pBuf = create_themeicon_button_from_chars(pTheme-PLAYERS_Icon, pWindow-dst, _(Call Diplomatic Meeting), adj_font(12), 0); @@ -1582,6 +1584,7 @@ pBuf-next-size.w = pBuf-size.w; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); +buttons++; pBuf = create_themeicon_button_from_chars(pTheme-CANCEL_Icon, pWindow-dst, _(Send him back), adj_font(12), 0); @@ -1592,20 +1595,13 @@ pBuf-key = SDLK_ESCAPE; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); - +buttons++; + button_h += adj_size(4); area.w = MAX(area.w, button_w + adj_size(20)); - -if(type != DS_WAR) { - if(shared) { - area.h += 4 * (button_h + adj_size(10)); - } else { -area.h += 3 * (button_h + adj_size(10)); - } -} else { - area.h += 2 * (button_h + adj_size(10)); -} - + +area.h += buttons * (button_h + adj_size(10)); + add_to_gui_list(ID_BUTTON, pBuf); @@ -1638,23 +1634,23 @@ pBuf = pWindow; -if(type != DS_WAR) { - /* cancel treaty */ +/* war: meet, peace: cancel treaty */ +pBuf = pBuf-prev; +pBuf-size.w = button_w; +pBuf-size.h = button_h; +pBuf-size.x = area.x + (area.w - (pBuf-size.w)) / 2; +pBuf-size.y = dst.y; + +if
[Freeciv-commits] r27917 - in /trunk/client: gui-sdl/diplodlg.c gui-sdl2/diplodlg.c
Author: cazfi Date: Sun Feb 1 06:50:22 2015 New Revision: 27917 URL: http://svn.gna.org/viewcvs/freeciv?rev=27917view=rev Log: Made it possible to Withdraw Vision from someone you're at war with in sdl-clients See bug #23210 Modified: trunk/client/gui-sdl/diplodlg.c trunk/client/gui-sdl2/diplodlg.c Modified: trunk/client/gui-sdl/diplodlg.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl/diplodlg.c?rev=27917r1=27916r2=27917view=diff == --- trunk/client/gui-sdl/diplodlg.c (original) +++ trunk/client/gui-sdl/diplodlg.c Sun Feb 1 06:50:22 2015 @@ -1489,8 +1489,9 @@ SDL_String16 *pStr; SDL_Surface *pText; SDL_Rect dst; -bool shared = FALSE; +bool shared; SDL_Rect area; +int buttons = 0; if (pSDip_Dlg) { return; @@ -1532,18 +1533,17 @@ FREESTRING16(pStr); area.w = MAX(area.w , pText-w); area.h += pText-h + adj_size(15); - -if(type != DS_WAR can_client_issue_orders()) { - - if(type == DS_ARMISTICE) { - fc_snprintf(cBuf, sizeof(cBuf), _(Declare WAR)); + +if (type != DS_WAR can_client_issue_orders()) { + if (type == DS_ARMISTICE) { +fc_snprintf(cBuf, sizeof(cBuf), _(Declare WAR)); } else { - fc_snprintf(cBuf, sizeof(cBuf), _(Cancel Treaty)); +fc_snprintf(cBuf, sizeof(cBuf), _(Cancel Treaty)); } - + /* cancel treaty */ pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, - pWindow-dst, cBuf, adj_font(12), 0); +pWindow-dst, cBuf, adj_font(12), 0); pBuf-action = cancel_pact_dlg_callback; set_wstate(pBuf, FC_WS_NORMAL); @@ -1555,27 +1555,29 @@ pBuf-next-size.w = pBuf-size.w; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); - - shared = gives_shared_vision(client.conn.playing, pPlayer); - - if(shared) { -/* shared vision */ -pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, pWindow-dst, - _(Withdraw vision), adj_font(12), 0); - -pBuf-action = withdraw_vision_dlg_callback; -set_wstate(pBuf, FC_WS_NORMAL); -pBuf-data.player = pPlayer; -pBuf-key = SDLK_w; - pBuf-string16-fgcol = *get_theme_color(COLOR_THEME_DIPLODLG_MEETING_TEXT); -add_to_gui_list(ID_BUTTON, pBuf); -pBuf-size.w = MAX(pBuf-next-size.w, pBuf-size.w); -pBuf-next-size.w = pBuf-size.w; -button_w = MAX(button_w , pBuf-size.w); -button_h = MAX(button_h , pBuf-size.h); - } -} - + buttons++; +} + +shared = gives_shared_vision(client.conn.playing, pPlayer); + +if (shared) { + /* shared vision */ + pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, pWindow-dst, +_(Withdraw vision), adj_font(12), 0); + + pBuf-action = withdraw_vision_dlg_callback; + set_wstate(pBuf, FC_WS_NORMAL); + pBuf-data.player = pPlayer; + pBuf-key = SDLK_w; + pBuf-string16-fgcol = *get_theme_color(COLOR_THEME_DIPLODLG_MEETING_TEXT); + add_to_gui_list(ID_BUTTON, pBuf); + pBuf-size.w = MAX(pBuf-next-size.w, pBuf-size.w); + pBuf-next-size.w = pBuf-size.w; + button_w = MAX(button_w , pBuf-size.w); + button_h = MAX(button_h , pBuf-size.h); + buttons++; +} + /* meet */ pBuf = create_themeicon_button_from_chars(pTheme-PLAYERS_Icon, pWindow-dst, _(Call Diplomatic Meeting), adj_font(12), 0); @@ -1590,6 +1592,7 @@ pBuf-next-size.w = pBuf-size.w; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); +buttons++; pBuf = create_themeicon_button_from_chars(pTheme-CANCEL_Icon, pWindow-dst, _(Send him back), adj_font(12), 0); @@ -1600,20 +1603,13 @@ pBuf-key = SDLK_ESCAPE; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); - +buttons++; + button_h += adj_size(4); area.w = MAX(area.w, button_w + adj_size(20)); - -if(type != DS_WAR) { - if(shared) { - area.h += 4 * (button_h + adj_size(10)); - } else { -area.h += 3 * (button_h + adj_size(10)); - } -} else { - area.h += 2 * (button_h + adj_size(10)); -} - + +area.h += buttons * (button_h + adj_size(10)); + add_to_gui_list(ID_BUTTON, pBuf); @@ -1646,23 +1642,23 @@ pBuf = pWindow; -if(type != DS_WAR) { - /* cancel treaty */ +/* war: meet, peace: cancel treaty */ +pBuf = pBuf-prev; +pBuf-size.w = button_w; +pBuf-size.h = button_h; +pBuf-size.x = area.x + (area.w - (pBuf-size.w)) / 2; +pBuf-size.y = dst.y; + +if
[Freeciv-commits] r27920 - /branches/S2_4/client/gui-sdl/diplodlg.c
Author: cazfi Date: Sun Feb 1 06:50:46 2015 New Revision: 27920 URL: http://svn.gna.org/viewcvs/freeciv?rev=27920view=rev Log: Made it possible to Withdraw Vision from someone you're at war with in sdl-clients See bug #23210 Modified: branches/S2_4/client/gui-sdl/diplodlg.c Modified: branches/S2_4/client/gui-sdl/diplodlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/gui-sdl/diplodlg.c?rev=27920r1=27919r2=27920view=diff == --- branches/S2_4/client/gui-sdl/diplodlg.c (original) +++ branches/S2_4/client/gui-sdl/diplodlg.c Sun Feb 1 06:50:46 2015 @@ -1481,8 +1481,9 @@ SDL_String16 *pStr; SDL_Surface *pText; SDL_Rect dst; -bool shared = FALSE; +bool shared; SDL_Rect area; +int buttons = 0; if (pSDip_Dlg) { return; @@ -1524,18 +1525,17 @@ FREESTRING16(pStr); area.w = MAX(area.w , pText-w); area.h += pText-h + adj_size(15); - -if(type != DS_WAR can_client_issue_orders()) { - - if(type == DS_ARMISTICE) { - fc_snprintf(cBuf, sizeof(cBuf), _(Declare WAR)); + +if (type != DS_WAR can_client_issue_orders()) { + if (type == DS_ARMISTICE) { +fc_snprintf(cBuf, sizeof(cBuf), _(Declare WAR)); } else { - fc_snprintf(cBuf, sizeof(cBuf), _(Cancel Treaty)); +fc_snprintf(cBuf, sizeof(cBuf), _(Cancel Treaty)); } - + /* cancel treaty */ pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, - pWindow-dst, cBuf, adj_font(12), 0); +pWindow-dst, cBuf, adj_font(12), 0); pBuf-action = cancel_pact_dlg_callback; set_wstate(pBuf, FC_WS_NORMAL); @@ -1547,27 +1547,29 @@ pBuf-next-size.w = pBuf-size.w; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); - - shared = gives_shared_vision(client.conn.playing, pPlayer); - - if(shared) { -/* shared vision */ -pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, pWindow-dst, - _(Withdraw vision), adj_font(12), 0); - -pBuf-action = withdraw_vision_dlg_callback; -set_wstate(pBuf, FC_WS_NORMAL); -pBuf-data.player = pPlayer; -pBuf-key = SDLK_w; - pBuf-string16-fgcol = *get_theme_color(COLOR_THEME_DIPLODLG_MEETING_TEXT); -add_to_gui_list(ID_BUTTON, pBuf); -pBuf-size.w = MAX(pBuf-next-size.w, pBuf-size.w); -pBuf-next-size.w = pBuf-size.w; -button_w = MAX(button_w , pBuf-size.w); -button_h = MAX(button_h , pBuf-size.h); - } -} - + buttons++; +} + +shared = gives_shared_vision(client.conn.playing, pPlayer); + +if (shared) { + /* shared vision */ + pBuf = create_themeicon_button_from_chars(pTheme-UNITS2_Icon, pWindow-dst, +_(Withdraw vision), adj_font(12), 0); + + pBuf-action = withdraw_vision_dlg_callback; + set_wstate(pBuf, FC_WS_NORMAL); + pBuf-data.player = pPlayer; + pBuf-key = SDLK_w; + pBuf-string16-fgcol = *get_theme_color(COLOR_THEME_DIPLODLG_MEETING_TEXT); + add_to_gui_list(ID_BUTTON, pBuf); + pBuf-size.w = MAX(pBuf-next-size.w, pBuf-size.w); + pBuf-next-size.w = pBuf-size.w; + button_w = MAX(button_w , pBuf-size.w); + button_h = MAX(button_h , pBuf-size.h); + buttons++; +} + /* meet */ pBuf = create_themeicon_button_from_chars(pTheme-PLAYERS_Icon, pWindow-dst, _(Call Diplomatic Meeting), adj_font(12), 0); @@ -1582,6 +1584,7 @@ pBuf-next-size.w = pBuf-size.w; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); +buttons++; pBuf = create_themeicon_button_from_chars(pTheme-CANCEL_Icon, pWindow-dst, _(Send him back), adj_font(12), 0); @@ -1592,20 +1595,13 @@ pBuf-key = SDLK_ESCAPE; button_w = MAX(button_w , pBuf-size.w); button_h = MAX(button_h , pBuf-size.h); - +buttons++; + button_h += adj_size(4); area.w = MAX(area.w, button_w + adj_size(20)); - -if(type != DS_WAR) { - if(shared) { - area.h += 4 * (button_h + adj_size(10)); - } else { -area.h += 3 * (button_h + adj_size(10)); - } -} else { - area.h += 2 * (button_h + adj_size(10)); -} - + +area.h += buttons * (button_h + adj_size(10)); + add_to_gui_list(ID_BUTTON, pBuf); @@ -1638,23 +1634,23 @@ pBuf = pWindow; -if(type != DS_WAR) { - /* cancel treaty */ +/* war: meet, peace: cancel treaty */ +pBuf = pBuf-prev; +pBuf-size.w = button_w; +pBuf-size.h = button_h; +pBuf-size.x = area.x + (area.w - (pBuf-size.w)) / 2; +pBuf-size.y = dst.y; + +if
[Freeciv-commits] r27925 - /branches/S2_6/ai/default/aicity.c
Author: cazfi Date: Sun Feb 1 08:05:57 2015 New Revision: 27925 URL: http://svn.gna.org/viewcvs/freeciv?rev=27925view=rev Log: AI considers building effects that also affect allies. It still ignores world-range effects out of fear that they then benefit enemies more than itself. Requested by Jacob Nevins jtn See bug #21415 Modified: branches/S2_6/ai/default/aicity.c Modified: branches/S2_6/ai/default/aicity.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/aicity.c?rev=27925r1=27924r2=27925view=diff == --- branches/S2_6/ai/default/aicity.c (original) +++ branches/S2_6/ai/default/aicity.c Sun Feb 1 08:05:57 2015 @@ -84,13 +84,13 @@ /* Iterate over cities within a certain range around a given city * (city_here) that exist within a given city list. */ -/* FIXME: should this include REQ_RANGE_ALLIANCE/WORLD? Gna bug #21415. */ #define city_range_iterate(city_here, list, range, city) \ { \ city_list_iterate(list, city) { \ if (range == REQ_RANGE_PLAYER \ - || range == REQ_RANGE_TEAM \ - || (range == REQ_RANGE_TRADEROUTE \ +|| range == REQ_RANGE_TEAM \ +|| range == REQ_RANGE_ALLIANCE \ +|| (range == REQ_RANGE_TRADEROUTE \ (city == city_here \ || have_cities_trade_route(city, city_here))) \ || ((range == REQ_RANGE_CITY || range == REQ_RANGE_LOCAL) \ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r27921 - in /trunk/client: gui-gtk-2.0/unitselect.c gui-gtk-3.0/unitselect.c
Author: cazfi Date: Sun Feb 1 07:34:23 2015 New Revision: 27921 URL: http://svn.gna.org/viewcvs/freeciv?rev=27921view=rev Log: Bind unit selection dialog to mapview center tile if opened without units in focus. This is just an safety measure, it should not be possible to open the dialog without units in focus. See patch #5752 Modified: trunk/client/gui-gtk-2.0/unitselect.c trunk/client/gui-gtk-3.0/unitselect.c Modified: trunk/client/gui-gtk-2.0/unitselect.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/unitselect.c?rev=27921r1=27920r2=27921view=diff == --- trunk/client/gui-gtk-2.0/unitselect.c (original) +++ trunk/client/gui-gtk-2.0/unitselect.c Sun Feb 1 07:34:23 2015 @@ -324,9 +324,12 @@ pdialog-ptile = ptile; } else if (pdialog-ptile == NULL) { struct unit *punit = head_of_units_in_focus(); + if (punit) { pdialog-ptile = unit_tile(punit); center_tile_mapcanvas(pdialog-ptile); +} else { + pdialog-ptile = get_center_tile_mapcanvas(); } } } Modified: trunk/client/gui-gtk-3.0/unitselect.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/unitselect.c?rev=27921r1=27920r2=27921view=diff == --- trunk/client/gui-gtk-3.0/unitselect.c (original) +++ trunk/client/gui-gtk-3.0/unitselect.c Sun Feb 1 07:34:23 2015 @@ -322,9 +322,12 @@ pdialog-ptile = ptile; } else if (pdialog-ptile == NULL) { struct unit *punit = head_of_units_in_focus(); + if (punit) { pdialog-ptile = unit_tile(punit); center_tile_mapcanvas(pdialog-ptile); +} else { + pdialog-ptile = get_center_tile_mapcanvas(); } } } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r27922 - in /branches/S2_6/client: gui-gtk-2.0/unitselect.c gui-gtk-3.0/unitselect.c
Author: cazfi Date: Sun Feb 1 07:34:31 2015 New Revision: 27922 URL: http://svn.gna.org/viewcvs/freeciv?rev=27922view=rev Log: Bind unit selection dialog to mapview center tile if opened without units in focus. This is just an safety measure, it should not be possible to open the dialog without units in focus. See patch #5752 Modified: branches/S2_6/client/gui-gtk-2.0/unitselect.c branches/S2_6/client/gui-gtk-3.0/unitselect.c Modified: branches/S2_6/client/gui-gtk-2.0/unitselect.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-2.0/unitselect.c?rev=27922r1=27921r2=27922view=diff == --- branches/S2_6/client/gui-gtk-2.0/unitselect.c (original) +++ branches/S2_6/client/gui-gtk-2.0/unitselect.c Sun Feb 1 07:34:31 2015 @@ -324,9 +324,12 @@ pdialog-ptile = ptile; } else if (pdialog-ptile == NULL) { struct unit *punit = head_of_units_in_focus(); + if (punit) { pdialog-ptile = unit_tile(punit); center_tile_mapcanvas(pdialog-ptile); +} else { + pdialog-ptile = get_center_tile_mapcanvas(); } } } Modified: branches/S2_6/client/gui-gtk-3.0/unitselect.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/unitselect.c?rev=27922r1=27921r2=27922view=diff == --- branches/S2_6/client/gui-gtk-3.0/unitselect.c (original) +++ branches/S2_6/client/gui-gtk-3.0/unitselect.c Sun Feb 1 07:34:31 2015 @@ -322,9 +322,12 @@ pdialog-ptile = ptile; } else if (pdialog-ptile == NULL) { struct unit *punit = head_of_units_in_focus(); + if (punit) { pdialog-ptile = unit_tile(punit); center_tile_mapcanvas(pdialog-ptile); +} else { + pdialog-ptile = get_center_tile_mapcanvas(); } } } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r27923 - in /branches/S2_5/client: gui-gtk-2.0/unitselect.c gui-gtk-3.0/unitselect.c
Author: cazfi Date: Sun Feb 1 07:34:39 2015 New Revision: 27923 URL: http://svn.gna.org/viewcvs/freeciv?rev=27923view=rev Log: Bind unit selection dialog to mapview center tile if opened without units in focus. This is just an safety measure, it should not be possible to open the dialog without units in focus. See patch #5752 Modified: branches/S2_5/client/gui-gtk-2.0/unitselect.c branches/S2_5/client/gui-gtk-3.0/unitselect.c Modified: branches/S2_5/client/gui-gtk-2.0/unitselect.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-2.0/unitselect.c?rev=27923r1=27922r2=27923view=diff == --- branches/S2_5/client/gui-gtk-2.0/unitselect.c (original) +++ branches/S2_5/client/gui-gtk-2.0/unitselect.c Sun Feb 1 07:34:39 2015 @@ -324,9 +324,12 @@ pdialog-ptile = ptile; } else if (pdialog-ptile == NULL) { struct unit *punit = head_of_units_in_focus(); + if (punit) { pdialog-ptile = unit_tile(punit); center_tile_mapcanvas(pdialog-ptile); +} else { + pdialog-ptile = get_center_tile_mapcanvas(); } } } Modified: branches/S2_5/client/gui-gtk-3.0/unitselect.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/unitselect.c?rev=27923r1=27922r2=27923view=diff == --- branches/S2_5/client/gui-gtk-3.0/unitselect.c (original) +++ branches/S2_5/client/gui-gtk-3.0/unitselect.c Sun Feb 1 07:34:39 2015 @@ -322,9 +322,12 @@ pdialog-ptile = ptile; } else if (pdialog-ptile == NULL) { struct unit *punit = head_of_units_in_focus(); + if (punit) { pdialog-ptile = unit_tile(punit); center_tile_mapcanvas(pdialog-ptile); +} else { + pdialog-ptile = get_center_tile_mapcanvas(); } } } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r27924 - /trunk/ai/default/aicity.c
Author: cazfi Date: Sun Feb 1 08:05:51 2015 New Revision: 27924 URL: http://svn.gna.org/viewcvs/freeciv?rev=27924view=rev Log: AI considers building effects that also affect allies. It still ignores world-range effects out of fear that they then benefit enemies more than itself. Requested by Jacob Nevins jtn See bug #21415 Modified: trunk/ai/default/aicity.c Modified: trunk/ai/default/aicity.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aicity.c?rev=27924r1=27923r2=27924view=diff == --- trunk/ai/default/aicity.c (original) +++ trunk/ai/default/aicity.c Sun Feb 1 08:05:51 2015 @@ -84,13 +84,13 @@ /* Iterate over cities within a certain range around a given city * (city_here) that exist within a given city list. */ -/* FIXME: should this include REQ_RANGE_ALLIANCE/WORLD? Gna bug #21415. */ #define city_range_iterate(city_here, list, range, city) \ { \ city_list_iterate(list, city) { \ if (range == REQ_RANGE_PLAYER \ - || range == REQ_RANGE_TEAM \ - || (range == REQ_RANGE_TRADEROUTE \ +|| range == REQ_RANGE_TEAM \ +|| range == REQ_RANGE_ALLIANCE \ +|| (range == REQ_RANGE_TRADEROUTE \ (city == city_here \ || have_cities_trade_route(city, city_here))) \ || ((range == REQ_RANGE_CITY || range == REQ_RANGE_LOCAL) \ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits