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

see the nuke processus when the function do_map_click is called:

control.c: l.1421:

        void do_map_click(struct tile *ptile, enum quickselect_type qtype)
        {
          struct city *pcity = map_get_city(ptile);
          struct unit *punit = player_find_unit_by_id(game.player_ptr, 
hover_unit);
          bool maybe_goto = FALSE;
        
          if (punit && hover_state != HOVER_NONE) {
            switch (hover_state) {
        [...]
            case HOVER_NUKE:
              if (SINGLE_MOVE * real_map_distance(punit->tile, ptile)
                  > punit->moves_left) {
                append_output_window(_("Game: Too far for this unit."));
              } else {
                do_unit_goto(ptile);
                /* note that this will be executed by the server after the goto 
*/
                if (!pcity)
                  do_unit_nuke(punit);
              }
              break;
        [...]
        
control.c: l.1626:

        void do_unit_goto(struct tile *ptile)
        {
          struct unit *punit = player_find_unit_by_id(game.player_ptr, 
hover_unit);
        
          if (hover_unit == 0 || hover_state != HOVER_GOTO)
            return;
        [...]

so do_unit_goto(ptile) (called l.1439) returns before doing something : so 
nuclears nukes where they are !!!
i propose you to change do_unit_goto(ptile) by send_unit_goto(punit,ptile).

Pepeto.



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to