diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/client/control.c workdir/client/control.c --- freeciv/client/control.c Thu May 18 22:20:57 2000 +++ workdir/client/control.c Fri May 19 00:29:52 2000 @@ -767,11 +767,7 @@ **************************************************************************/ void do_move_unit(struct unit *punit, struct packet_unit_info *pinfo) { - int x, y, was_carried, was_teleported; - - was_carried=(pinfo->movesleft==punit->moves_left && - (map_get_terrain(punit->x, punit->y)==T_OCEAN || - map_get_terrain(pinfo->x, pinfo->y)==T_OCEAN)); + int x, y, was_teleported; was_teleported=!is_tiles_adjacent(punit->x, punit->y, pinfo->x, pinfo->y); x=punit->x; @@ -781,7 +777,7 @@ unit_list_unlink(&map_get_tile(x, y)->units, punit); - if(!was_carried) + if(!pinfo->carried) refresh_tile_mapcanvas(x, y, was_teleported); if(game.player_idx==punit->owner && punit->activity!=ACTIVITY_GOTO && @@ -789,7 +785,7 @@ !tile_visible_and_not_on_border_mapcanvas(pinfo->x, pinfo->y)) center_tile_mapcanvas(pinfo->x, pinfo->y); - if(!was_carried && !was_teleported) { + if(!pinfo->carried && !was_teleported) { int dx=pinfo->x - x; if(dx>1) dx=-1; else if(dx<-1) @@ -817,7 +813,7 @@ } } - if(!was_carried && tile_is_known(punit->x,punit->y) == TILE_KNOWN) + if(!pinfo->carried && tile_is_known(punit->x,punit->y) == TILE_KNOWN) refresh_tile_mapcanvas(punit->x, punit->y, 1); if(get_unit_in_focus()==punit) update_menus(); diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/common/packets.c workdir/common/packets.c --- freeciv/common/packets.c Thu May 18 22:21:23 2000 +++ workdir/common/packets.c Fri May 19 00:23:42 2000 @@ -1641,7 +1641,11 @@ cptr=put_uint8(buffer+2, PACKET_UNIT_INFO); cptr=put_uint16(cptr, req->id); cptr=put_uint8(cptr, req->owner); - pack=(req->veteran?0x10:0)|(req->ai?0x20:0)|(req->paradropped?0x40:0)|(req->connecting?0x80:0); + pack=(req->carried ? 0x08 : 0) + | (req->veteran ? 0x10 : 0) + | (req->ai ? 0x20 : 0) + | (req->paradropped ? 0x40 : 0) + | (req->connecting ? 0x80 : 0); cptr=put_uint8(cptr, pack); cptr=put_uint8(cptr, req->x); cptr=put_uint8(cptr, req->y); @@ -1820,10 +1824,11 @@ iget_uint16(&iter, &packet->id); iget_uint8(&iter, &packet->owner); iget_uint8(&iter, &pack); - packet->veteran=(pack&0x10)?1:0; - packet->ai=(pack&0x20)?1:0; - packet->paradropped=(pack&0x40)?1:0; - packet->connecting=(pack&0x80)?1:0; + packet->veteran = (pack&0x10) ? 1 : 0; + packet->ai = (pack&0x20) ? 1 : 0; + packet->paradropped = (pack&0x40) ? 1 : 0; + packet->connecting = (pack&0x80) ? 1 : 0; + packet->carried = (pack&0x08) ? 1 : 0; iget_uint8(&iter, &packet->x); iget_uint8(&iter, &packet->y); iget_uint16(&iter, &packet->homecity); diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/common/packets.h workdir/common/packets.h --- freeciv/common/packets.h Thu May 18 22:21:23 2000 +++ workdir/common/packets.h Fri May 19 00:02:01 2000 @@ -292,6 +292,7 @@ int activity_target; int paradropped; int connecting; + int carried; }; diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/server/unitfunc.c workdir/server/unitfunc.c --- freeciv/server/unitfunc.c Thu May 18 22:21:44 2000 +++ workdir/server/unitfunc.c Fri May 19 00:01:34 2000 @@ -2498,7 +2498,8 @@ x and y is where the unit came from, so that the info can be sent if the other players can see either the target or destination tile. **************************************************************************/ -void send_unit_info_to_onlookers(struct player *dest, struct unit *punit, int x, int y) +void send_unit_info_to_onlookers(struct player *dest, struct unit *punit, + int x, int y, int carried) { int o; struct packet_unit_info info; @@ -2525,6 +2526,7 @@ info.activity_target=punit->activity_target; info.paradropped=punit->paradropped; info.connecting=punit->connecting; + info.carried = carried; for(o=0; ox,punit->y); + send_unit_info_to_onlookers(dest, punit, punit->x,punit->y, 0); } /************************************************************************** @@ -2990,7 +2992,7 @@ pcargo->x = dest_x; pcargo->y = dest_y; unit_list_insert(&pdesttile->units, pcargo); - send_unit_info_to_onlookers(0, pcargo, src_x, src_y); + send_unit_info_to_onlookers(0, pcargo, src_x, src_y, 1); handle_unit_move_consequences(pcargo, src_x, src_y, dest_x, dest_y); } } unit_list_iterate_end; @@ -3015,7 +3017,7 @@ !(pplayer->ai.control)) { set_unit_activity(punit, ACTIVITY_SENTRY); } - send_unit_info_to_onlookers(0, punit, src_x, src_y); + send_unit_info_to_onlookers(0, punit, src_x, src_y, 0); handle_unit_move_consequences(punit, src_x, src_y, dest_x, dest_y); diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/server/unitfunc.h workdir/server/unitfunc.h --- freeciv/server/unitfunc.h Thu May 18 22:21:44 2000 +++ workdir/server/unitfunc.h Fri May 19 00:25:26 2000 @@ -55,7 +55,8 @@ void kill_unit(struct unit *pkiller, struct unit *punit); void send_unit_info(struct player *dest, struct unit *punit); -void send_unit_info_to_onlookers(struct player *dest, struct unit *punit, int x, int y); +void send_unit_info_to_onlookers(struct player *dest, struct unit *punit, + int x, int y, int carried); void maybe_make_veteran(struct unit *punit); void unit_versus_unit(struct unit *attacker, struct unit *defender); int get_total_attack_power(struct unit *attacker, struct unit *defender);