DELTA 25165 0 28833
SVN        ^ t ` #SΏ ζ0p Yπrr WΧ? ­qψ& '¦.R UΘv x¬K ΤhΑ`M W6 £k+ OΒ C  όl σhΐp© Y΄V -·\g Ρ  F»? UΎ}C oΏM WΧ? 8Ε? 9Θ0 ­JΞ2 $ό‘ Lϊ } Q@² Lϊ ~ [³=ͺ KΩ ² [ό  7 QΖ  Sϊ  FM_ r Sͺ χ9vcombat.h"
#include "game.h"
#include "map.h"
#include "movement.h"
#include "unitlist.h"

/* client/include */
#include "chatline_g.h"
#include "citydlg_g.h"
#include "dialogs_g.h"
#include "gui_main_g.h"
#include "mapctrl_g.h"
#include "mapview_g.h"
#include "menu_g.h"

/* client */
#include "audio.h"
#include "client_main.h"
#include "climap.h"
#include "climisc.h"
#include "editor.h"
#include "goto.h"
#include "options.h"
#include "overview_common.h"
#include "tilespec.h"
#include "update_queue.h"

#include "control.h"


struct client_nuke_data {
  int *units_id;
  int units_num;
  int tile_idx;
};Current moving unit. */
static struct unit *punit_moving = NULLremove(punit);
  if (get_num_units_in_focus() > 0) {
    focus_units_changed();
  } else {
    unit_focus_advance(unit_list_iterate(get_units_in_focus(), punit) {
    if (punit != punit_moving &&       bool blocking_mode;
      struct option *opt;

      opt = optset_option_by_name(server_optset, "turnblock");
      if (opt != NULL) {
        blocking_mode = option_bool_get(opt);
      } else {
        blocking_mode = FALSE;
      }

      players_iterate_alive(pplayer) {
        if (pplayer->is_connected || blocking_modeif (is_valid_goto_destination(ptile)) {
      mouse_cursor_type = CURSOR_NUKEif (unit_list_size(punits) == 0) {
    return;
  }

  unit_list_iterate(punits, punit) {
    if (!unit_has_type_flag(punit, UTYF_NUCLEAR)) {
    _("Only nuclear units can do this."));
      return;
    }
  } unit_list_iterate_end;

  if (hover_state != HOVER_NUKE) {
    set_hover_state(punits, HOVER_NUKE, ACTIVITY_LAST, NULL, ORDER_LAST  bool in_focus = unit_is_in_focus(punit)if (hover_state != HOVER_NONE && in_focus) {
    /* Cancel current goto/patrol/connect/nuke command. */unit_list_remove(src_tile->units, punit);

  if (!unit_transported(punit)) {
    /* Mark the unit as moving unit, then find_visible_unit() won't return
     * it. It is especially useful to don't draw many times the unit when
     * refreshing the canvas. */
    punit_moving = punit;
tile_set(punit, dst_tile);/* For find_visible_unit(), see above. */
    punit_moving = NULL;
in_focus) {
    menus_update(do_unit_nuke(ptile);**
  Destroy the client nuke data**/
static void client_nuke_data_destroy(void *p)
{
  struct client_nuke_data *data = p;

  free(data->units_id);
  free(data**
  Explode nuclear at a tile without enemy units**/
static void do_real_unit_nuke(void *p)
{
  struct client_nuke_data *data = p;
  struct tile *ptile = index_to_tile(data->tile_idx);
  struct unit *punit;
  int i;

  fc_assert_ret(can_client_issue_orders());
  fc_assert_ret(ptile != NULL);

  for (i = 0; i < data->units_num; i++) {
    /* Ensure we have reached destination. */
    punit = player_unit_by_number(client_player(), data->units_id[i]);
    if (punit != NULL && unit_tile(punit) == ptile) {
      dsend_packet_unit_nuke(&client.conn, punit->id**
  Send units to 'ptile' and nuke there!**/
void do_unit_nuke(struct tile *ptile)
{
  if (truct client_nuke_data *data = fc_malloc(sizeof(*data));
    int last_request_id_used = client.conn.client.last_request_id_used;
    int i = 0;

    data->units_id = fc_malloc(sizeof(*data->units_id)
                               * get_num_units_in_focus());
    unit_list_iterate(get_units_in_focus(), punit) {
      data->units_id[i++] = punit->id;
    } unit_list_iterate_end;
    data->units_num = i;
    data->tile_idx = tile_index(ptile);

    send_goto_route();

    if (last_request_id_used != client.conn.client.last_request_id_used) {
      /* We sent some packets, let's wait the server to process them to know
       * where our units hold. */
      update_queue_connect_processing_finished_full
          (client.conn.client.last_request_id_used,
           do_real_unit_nuke, data, client_nuke_data_destroy);
    } else {
      /* We didn't sent the packets, that mean that the route was nil, or
       * an internal error occured. Process nuke units now. */
      do_real_unit_nuke(data);
      client_nuke_data_destroy(data);
    }Paradrop to a locationcase HOVER_NUKE:
    if (goto_pop_waypoint()) {
      break;
    }
    /* else fall through: */case HOVER_NONE:
    break;
  }  ³Ιii	$ R‘ D@K U Ώ D@H j ]‘>± UΎ D@G V Ώ D@F U§ D@L i j@― V ` D@H UZ D@ ³ NUM_BATTLEGROUPS) {
    int i = 0;

    if (unit_list_size(battlegroups[battlegroup]) == 0 && !append) {
      unit_focus_set(NULL);
      return;
    }

    /* FIXME: this is very inefficient and can be improved. */
    unit_list_iterate(battlegroups[battlegroup], punit) {
      if (i == 0 && !append) {
	unit_focus_set(punit);
      } else {
	unit_focus_add(punit);
      }
      i++;
    } unit_list_iterate_end;
  }Toggle drawing of city outlines.
******/
void key_city_outlines_toggle(void)
{
  request_toggle_city_outlineToggle drawing of city output produced by workers of the city.
******/
void key_city_output_toggle(void)
{
  request_toggle_city_outputap gridmap_grid_toggle(void)
{
  request_toggle_map_gridToggle map borders on the mapview on/off based on a keypress.
******/
void key_map_borders_toggle(void)
{
  request_toggle_map_borderToggle native tiles on the mapview on/off based on a keypress.
******/
void key_map_native_toggle(void)
{
  request_toggle_map_nativeToggle the "Draw the city bar" option.
******/
void key_city_full_bar_toggle(void)
{
  request_toggle_city_full_barcity namesnames_toggle(void)
{
  request_toggle_city_nameToggles the "show city growth turns" option by passing off the
  request to another function...
******/
void key_city_growth_toggle(void)
{
  request_toggle_city_growthToggles the showing of the buy cost of the current production in the
  city descriptions.
**ENDREP
id: gz.5kv.r28195/6020
type: file
pred: gz.5kv.r26826/795
count: 328
text: 28195 0 5993 111849 7e8d45db32dab281d6bc3d1673ec669e
props: 11088 7720 112 0 89a05fc93c37a832d4b63085dac12c4b
cpath: /branches/S2_5/client/control.c
copyroot: 22812 /branches/S2_5

PLAIN
K 11
Makefile.am
V 23
file 5f.5kv.r25962/1188
K 6
agents
V 22
dir zf.5kv.r27765/1055
K 11
attribute.c
V 24
file xh.5kv.r27498/50327
K 11
attribute.h
V 24
file xi.5ck.r18863/23649
K 7
audio.c
V 24
file 139.5ck.r22180/7668
K 7
audio.h
V 24
file 13a.5ck.r22180/7911
K 12
audio_none.c
V 26
file 13d.5ck.r19259/462511
K 12
audio_none.h
V 25
file 13e.5ck.r18863/20841
K 11
audio_sdl.c
V 25
file 13f.5ck.r19354/73618
K 11
audio_sdl.h
V 25
file 13g.5ck.r18863/23885
K 17
chatline_common.c
V 24
file 14q.5kv.r24896/5437
K 17
chatline_common.h
V 24
file 14r.5kv.r24893/5197
K 16
citydlg_common.c
V 23
file z4.5kv.r25543/5114
K 16
citydlg_common.h
V 24
file z5.5ck.r18863/18619
K 13
cityrepdata.c
V 22
file mb.5kv.r24130/185
K 13
cityrepdata.h
V 24
file mc.5ck.r18863/19121
K 13
client_main.c
V 22
file 2f.5m3.r27644/305
K 13
client_main.h
V 24
file hz.5p3.r26715/15332
K 8
climap.c
V 24
file 197.5ck.r20232/3008
K 8
climap.h
V 25
file 198.5ck.r18863/24126
K 9
climisc.c
V 24
file d5.5kv.r26655/41648
K 9
climisc.h
V 24
file i0.5kv.r26655/41906
K 8
clinet.c
V 23
file hc.5kv.r26022/1649
K 8
clinet.h
V 24
file i1.5ck.r18863/24866
K 15
colors_common.c
V 24
file 33a.5kv.r22856/3020
K 15
colors_common.h
V 25
file 33b.5kv.r24137/11622
K 19
connectdlg_common.c
V 25
file 2fw.5kv.r26715/15608
K 19
connectdlg_common.h
V 25
file 2fx.5ck.r19154/53802
K 9
control.c
V 23
file gz.5kv.r28195/6020
K 9
control.h
V 23
file i2.5kv.r26325/5744
K 7
dummy.c
V 26
file 4f9.5kv.r26906/128290
K 12
dummycxx.cpp
V 25
file 6kr.5kv.r26906/60002
K 8
editor.c
V 23
file 3bg.5kv.r26199/994
K 8
editor.h
V 24
file 3bh.5kv.r26199/1251
K 11
ggzclient.c
V 26
file 394.5ck.r20126/104106
K 11
ggzclient.h
V 25
file 395.5ck.r18863/21083
K 17
global_worklist.c
V 26
file 4i6.5kv.r26906/111450
K 17
global_worklist.h
V 26
file 4i7.5kv.r26906/120138
K 6
goto.c
V 22
file vu.5kv.r26658/166
K 6
goto.h
V 24
file vv.5ck.r20865/49000
K 11
gui-gtk-2.0
V 22
dir zs.5kv.r28098/5730
K 11
gui-gtk-3.0
V 22
dir zs.5kx.r28155/4417
K 6
gui-qt
V 23
dir 6ie.5kv.r28038/4996
K 7
gui-sdl
V 23
dir 16t.5kv.r27919/6644
K 8
gui-stub
V 23
dir mh.5kv.r27287/14406
K 7
gui-xaw
V 23
dir 9o.5kv.r27287/22897
K 14
gui_cbsetter.c
V 25
file a3c.5kv.r26906/75933
K 14
gui_cbsetter.h
V 25
file a3d.5kv.r26906/85422
K 15
gui_interface.c
V 26
file 6jm.5ni.r26906/120454
K 15
gui_interface.h
V 26
file 6jn.5nj.r26906/120785
K 10
helpdata.c
V 23
file h1.5kv.r28130/1374
K 10
helpdata.h
V 24
file i3.5kv.r25496/41390
K 7
include
V 24
dir b8.5kv.r26906/119832
K 19
luaconsole_common.c
V 25
file 75z.5kv.r26906/75620
K 19
luaconsole_common.h
V 25
file 760.5kv.r26906/76240
K 9
luascript
V 25
dir 761.5kv.r26906/110514
K 16
mapctrl_common.c
V 24
file 15m.5kv.r27636/2488
K 16
mapctrl_common.h
V 25
file 15n.5ck.r19893/12504
K 16
mapview_common.c
V 23
file z2.5kv.r26344/3914
K 16
mapview_common.h
V 24
file z3.5ck.r20392/39510
K 19
messagewin_common.c
V 25
file 14s.5ck.r19354/71979
K 19
messagewin_common.h
V 25
file 14t.5ck.r18863/21579
K 9
options.c
V 23
file dc.5kv.r27393/9704
K 9
options.h
V 23
file i4.5kv.r23149/6288
K 17
overview_common.c
V 25
file 2yk.5kv.r23660/90028
K 17
overview_common.h
V 24
file 2yl.5ck.r19511/5441
K 10
packhand.c
V 22
file n.5kv.r27034/4159
K 10
packhand.h
V 24
file i5.5ck.r18863/20596
K 15
plrdlg_common.c
V 23
file 14u.5kv.r23427/983
K 15
plrdlg_common.h
V 25
file 14v.5ck.r18863/21328
K 17
repodlgs_common.c
V 25
file 11i.5ck.r22325/76263
K 17
repodlgs_common.h
V 25
file 11j.5ck.r19589/11861
K 9
reqtree.c
V 25
file 2ym.5kv.r24137/11365
K 9
reqtree.h
V 24
file 2yn.5ck.r19057/3837
K 9
servers.c
V 25
file 33x.5kv.r25000/28091
K 9
servers.h
V 25
file 33y.5ck.r20478/36372
K 6
text.c
V 25
file 2g3.5kv.r26230/82827
K 6
text.h
V 25
file 2g4.5ck.r22264/31375
K 15
themes_common.c
V 22
file 352.5kv.r26466/95
K 15
themes_common.h
V 25
file 353.5ck.r18863/22710
K 10
tilespec.c
V 22
file hl.5kv.r27294/574
K 10
tilespec.h
V 23
file i6.5kv.r26463/2683
K 19
unitselect_common.c
V 26
file 76v.5kv.r26906/110817
K 19
unitselect_common.h
V 26
file 76w.5kv.r26906/111132
K 14
update_queue.c
V 25
file 4jw.5kv.r26906/74380
K 14
update_queue.h
V 25
file 4jx.5kv.r26906/75002
K 10
voteinfo.c
V 25
file 4fe.5kv.r26906/74693
K 10
voteinfo.h
V 25
file 4ff.5kv.r26906/75313
END
ENDREP
id: d.5kv.r28195/10506
type: dir
pred: d.5kv.r28155/8917
count: 6048
text: 28195 6276 4217 4217 963acee891bad42b6bab6f13b1e101fe
props: 23991 877 341 0 4a292777c297b001f37cdd3988879aee
cpath: /branches/S2_5/client
copyroot: 22812 /branches/S2_5

PLAIN
K 9
ABOUT-NLS
V 24
file fu.5kv.r23463/86338
K 7
AUTHORS
V 24
file 5u.5ck.r22143/14016
K 7
COPYING
V 19
file 1h.0.r9643/400
K 9
ChangeLog
V 26
file 6l.5kv.r27105/6247100
K 7
INSTALL
V 21
file 6.5kv.r27779/472
K 11
Makefile.am
V 22
file 59.5kv.r27141/100
K 4
NEWS
V 24
file 6m.5kv.r27102/55945
K 8
NEWS-2.5
V 24
file 1h59.5kv.r27109/200
K 6
README
V 20
file 7.0.r4421/96382
K 2
ai
V 21
dir 8.5kv.r28094/2842
K 10
autogen.sh
V 23
file 12o.5kv.r24092/228
K 9
bootstrap
V 23
dir 2p5.5kv.r27141/1850
K 6
client
V 22
dir d.5kv.r28195/10506
K 6
common
V 21
dir p.5kv.r28192/8951
K 12
configure.ac
V 23
file 149.5kv.r27511/141
K 4
data
V 21
dir w.5kv.r28192/4128
K 6
debian
V 22
dir 5w.5kv.r23304/4091
K 12
dependencies
V 25
dir 2yu.5kv.r26906/165544
K 11
diff_ignore
V 24
file qq.5ck.r21039/26581
K 3
doc
V 22
dir k7.5kv.r28176/4182
K 10
fc_version
V 22
file 2lo.5kw.r27103/46
K 2
m4
V 23
dir 12p.5kv.r27088/2974
K 7
scripts
V 23
dir 2yo.5kv.r26113/1118
K 6
server
V 21
dir z.5kv.r28181/5592
K 5
tests
V 22
dir 2g9.5kv.r27024/930
K 5
tools
V 23
dir 4pj.5lo.r28090/1152
K 12
translations
V 26
dir t0n.5kv.r28183/1037085
K 7
utility
V 22
dir 1c.5kv.r27905/3384
K 3
vms
V 25
dir u9.5ck.r21528/1396085
K 5
win32
V 23
dir 2eu.5kv.r27293/1686
END
ENDREP
id: 3.5kv.r28195/11998
type: dir
pred: 3.5kv.r28192/10439
count: 17764
text: 28195 10752 1233 1233 f06c7708e14fed631dd6908114c6a182
props: 20140 3888 282 0 e4bb46e81629a60eef613b169b23a9ea
cpath: /branches/S2_5
copyroot: 22812 /branches/S2_5

PLAIN
K 5
S1_14
V 21
dir 3.21.r18109/18803
K 4
S2_0
V 21
dir 3.10x.r21862/4178
K 4
S2_1
V 22
dir 3.59e.r20026/11014
K 4
S2_2
V 21
dir 3.5cy.r21861/5036
K 4
S2_3
V 21
dir 3.5f2.r24391/5183
K 4
S2_4
V 24
dir 3.5ii.r28183/1049412
K 4
S2_5
V 22
dir 3.5kv.r28195/11998
K 4
S2_6
V 21
dir 3.5qi.r28194/6412
K 11
freeciv-web
V 22
dir 3.5bl.r13594/14918
END
ENDREP
id: 1.0.r28195/12597
type: dir
pred: 1.0.r28194/7009
count: 8867
text: 28195 12241 343 343 e62680bc2f9424cac0409a52abcf9a7c
cpath: /branches
copyroot: 0 /

PLAIN
K 8
branches
V 20
dir 1.0.r28195/12597
K 4
tags
V 19
dir 2.0.r27200/6414
K 5
trunk
V 21
dir 3.5ck.r28193/6345
K 7
website
V 21
dir 3ge.0.r22980/2263
END
ENDREP
id: 0.0.r28195/12919
type: dir
pred: 0.0.r28194/7329
count: 28195
text: 28195 12753 153 153 122c5694a339c9a368e7eceb78e7f538
cpath: /
copyroot: 0 /

gz.5kv.t28194-1 modify true false /branches/S2_5/client/control.c


12919 13068
