diff -ur freeciv/client/control.c show_transporter_on_top2/client/control.c
--- freeciv/client/control.c	Mon Mar 13 14:08:08 2000
+++ show_transporter_on_top2/client/control.c	Wed Mar 15 17:32:24 2000
@@ -103,9 +103,6 @@
   }
 }
 
-
-
-
 /**************************************************************************
 If there is no unit currently in focus, or if the current unit in
 focus should not be in focus, then get a new focus unit.
@@ -123,7 +120,6 @@
   }
 }
 
-
 /**************************************************************************
 ...
 **************************************************************************/
@@ -206,6 +202,50 @@
   unit_list_iterate_end;
   return best_candidate;
 }
+
+/**************************************************************************
+Return a pointer to a visible unit, if there is one.
+**************************************************************************/
+struct unit *find_visible_unit(struct tile *ptile)
+{
+  if(unit_list_size(&ptile->units)==0) return NULL;
+
+  /* If the unit in focus is at this tile, show that on top */
+  if (punit_focus && map_get_tile(punit_focus->x,punit_focus->y) == ptile) {
+    unit_list_iterate(ptile->units, punit)
+      if(punit == punit_focus) return punit;
+    unit_list_iterate_end;
+  }
+
+  /* If a unit is attacking we should show that on top */
+  if (punit_attacking && map_get_tile(punit_attacking->x,punit_attacking->y) == ptile) {
+    unit_list_iterate(ptile->units, punit)
+      if(punit == punit_attacking) return punit;
+    unit_list_iterate_end;
+  }
+
+  /* If a unit is defending we should show that on top */
+  if (punit_defending && map_get_tile(punit_defending->x,punit_defending->y) == ptile) {
+    unit_list_iterate(ptile->units, punit)
+      if(punit == punit_defending) return punit;
+    unit_list_iterate_end;
+  }
+
+  /* If there is a transporter in the stack we will show that on top */
+  unit_list_iterate(ptile->units, punit)
+    if (get_transporter_capacity(punit) &&
+	player_can_see_unit(game.player_ptr, punit))
+      return punit;
+  unit_list_iterate_end;
+
+  /* Else just return the first unit we can see */
+  unit_list_iterate(ptile->units, punit)
+    if(player_can_see_unit(game.player_ptr, punit)) return punit;
+  unit_list_iterate_end;
+
+  return NULL;
+}
+
 
 /**************************************************************************
 ...
diff -ur freeciv/client/control.h show_transporter_on_top2/client/control.h
--- freeciv/client/control.h	Mon Mar 13 14:07:22 2000
+++ show_transporter_on_top2/client/control.h	Wed Mar 15 17:54:31 2000
@@ -51,6 +51,7 @@
 void set_unit_focus(struct unit *punit);
 void set_unit_focus_no_center(struct unit *punit);
 void update_unit_focus(void);
+struct unit *find_visible_unit(struct tile *ptile);
 
 void key_cancel_action(void);
 void key_end_turn(void);
@@ -90,5 +91,7 @@
 void key_unit_wait(void);
 void key_unit_wakeup_others(void);
 
+struct unit *punit_attacking;
+struct unit *punit_defending;
 
 #endif  /* FC__CONTROL_H */
diff -ur freeciv/client/gui-gtk/mapctrl.c show_transporter_on_top2/client/gui-gtk/mapctrl.c
--- freeciv/client/gui-gtk/mapctrl.c	Mon Mar 13 14:08:08 2000
+++ show_transporter_on_top2/client/gui-gtk/mapctrl.c	Tue Mar 14 15:22:38 2000
@@ -159,7 +159,7 @@
       count++;
     }
     
-    if((punit=player_find_visible_unit(game.player_ptr, ptile)) && !pcity) {
+    if((punit=find_visible_unit(ptile)) && !pcity) {
       char cn[64];
       struct unit_type *ptype=get_unit_type(punit->type);
       cn[0]='\0';
diff -ur freeciv/client/gui-gtk/mapview.c show_transporter_on_top2/client/gui-gtk/mapview.c
--- freeciv/client/gui-gtk/mapview.c	Mon Mar 13 14:08:08 2000
+++ show_transporter_on_top2/client/gui-gtk/mapview.c	Wed Mar 15 17:47:13 2000
@@ -139,8 +139,8 @@
   struct unit *losing_unit = (hp0 == 0 ? punit0 : punit1);
   int i;
 
-  set_unit_focus_no_center(punit0);
-  set_unit_focus_no_center(punit1);
+  punit_attacking = punit0;
+  punit_defending = punit1;
   
   if (!do_combat_animation) {
     punit0->hp = hp0;
@@ -189,6 +189,8 @@
     usleep_since_timer_start(anim_timer, 20000);
   }
 
+  punit_attacking = NULL;
+  punit_defending = NULL;
   refresh_tile_mapcanvas(punit0->x, punit0->y, 1);
   refresh_tile_mapcanvas(punit1->x, punit1->y, 1);
 }
@@ -674,7 +676,7 @@
   
   if(!ptile->known)
     gdk_gc_set_foreground (fill_bg_gc, colors_standard[COLOR_STD_BLACK]);
-  else if((punit=player_find_visible_unit(game.player_ptr, ptile))) {
+  else if ((punit=find_visible_unit(ptile))) {
     if(punit->owner==game.player_idx)
       gdk_gc_set_foreground (fill_bg_gc, colors_standard[COLOR_STD_YELLOW]);
     else
@@ -1209,7 +1211,7 @@
         struct tile *ptile;
         struct unit *punit;
         ptile=map_get_tile(abs_x0, abs_y0);
-        if((punit=player_find_visible_unit(game.player_ptr, ptile)))
+        if ((punit=find_visible_unit(ptile)))
           pplayer = &game.players[punit->owner];
 
       } else
diff -ur freeciv/client/gui-mui/mapclass.c show_transporter_on_top2/client/gui-mui/mapclass.c
--- freeciv/client/gui-mui/mapclass.c	Mon Mar 13 14:08:08 2000
+++ show_transporter_on_top2/client/gui-mui/mapclass.c	Tue Mar 14 15:27:38 2000
@@ -563,7 +563,7 @@
 	struct tile *ptile;
 	struct unit *punit;
 	ptile = map_get_tile(abs_x0, abs_y0);
-	if ((punit = player_find_visible_unit(game.player_ptr, ptile)))
+	if (punit = find_visible_unit(ptile))
 	  pplayer = &game.players[punit->owner];
 
       }
@@ -708,7 +708,7 @@
 	DoMethod(group, OM_ADDMEMBER, text_obj);
       }
 
-      if ((punit = player_find_visible_unit(game.player_ptr, ptile)) && !pcity)
+      if ((punit = find_visible_unit(ptile)) && !pcity)
       {
 	char cn[64];
 	struct unit_type *ptype = get_unit_type(punit->type);
@@ -1741,7 +1741,7 @@
 	static char title[256];
 
 	pcity = map_get_city(x, y);
-	punit = player_find_visible_unit(game.player_ptr, ptile);
+	punit = find_visible_unit(ptile);
 	focus = get_unit_in_focus();
 
 	if (pcity)
diff -ur freeciv/client/gui-mui/overviewclass.c show_transporter_on_top2/client/gui-mui/overviewclass.c
--- freeciv/client/gui-mui/overviewclass.c	Mon Mar 13 14:07:23 2000
+++ show_transporter_on_top2/client/gui-mui/overviewclass.c	Tue Mar 14 15:27:55 2000
@@ -124,7 +124,7 @@
   }
   else
   {
-    if ((punit = player_find_visible_unit(game.player_ptr, ptile)))
+    if (punit = find_visible_unit(ptile))
     {
       if (punit->owner == game.player_idx)
       {
diff -ur freeciv/client/gui-xaw/mapctrl.c show_transporter_on_top2/client/gui-xaw/mapctrl.c
--- freeciv/client/gui-xaw/mapctrl.c	Mon Mar 13 14:08:08 2000
+++ show_transporter_on_top2/client/gui-xaw/mapctrl.c	Tue Mar 14 15:22:38 2000
@@ -149,7 +149,7 @@
       XtCreateManagedWidget(s, smeBSBObjectClass, p, NULL, 0);
     }
 
-    if((punit=player_find_visible_unit(game.player_ptr, ptile)) && !pcity) {
+    if((punit=find_visible_unit(ptile)) && !pcity) {
       char cn[64];
       struct unit_type *ptype=get_unit_type(punit->type);
       cn[0]='\0';
diff -ur freeciv/client/gui-xaw/mapview.c show_transporter_on_top2/client/gui-xaw/mapview.c
--- freeciv/client/gui-xaw/mapview.c	Mon Mar 13 14:07:22 2000
+++ show_transporter_on_top2/client/gui-xaw/mapview.c	Wed Mar 15 17:46:07 2000
@@ -114,8 +114,8 @@
   struct unit *losing_unit = (hp0 == 0 ? punit0 : punit1);
   int i;
 
-  set_unit_focus_no_center(punit0);
-  set_unit_focus_no_center(punit1);
+  punit_attacking = punit0;
+  punit_defending = punit1;
   
   if (!do_combat_animation) {
     punit0->hp = hp0;
@@ -165,6 +165,8 @@
 
   refresh_tile_mapcanvas(punit0->x, punit0->y, 1);
   refresh_tile_mapcanvas(punit1->x, punit1->y, 1);
+  punit_attacking = NULL;
+  punit_defending = NULL;
 }
 
 
@@ -647,7 +649,7 @@
   
   if(!ptile->known)
     XSetForeground(display, fill_bg_gc, colors_standard[COLOR_STD_BLACK]);
-  else if((punit=player_find_visible_unit(game.player_ptr, ptile))) {
+  else if (punit=find_visible_unit(ptile)) {
     if(punit->owner==game.player_idx)
       XSetForeground(display, fill_bg_gc, colors_standard[COLOR_STD_YELLOW]);
     else
@@ -1135,7 +1137,7 @@
         struct tile *ptile;
         struct unit *punit;
         ptile=map_get_tile(abs_x0, abs_y0);
-        if((punit=player_find_visible_unit(game.player_ptr, ptile)))
+        if (punit=find_visible_unit(ptile))
           pplayer = &game.players[punit->owner];
 
       } else
diff -ur freeciv/client/packhand.c show_transporter_on_top2/client/packhand.c
--- freeciv/client/packhand.c	Mon Mar 13 14:08:08 2000
+++ show_transporter_on_top2/client/packhand.c	Wed Mar 15 18:17:05 2000
@@ -128,12 +128,8 @@
 
   if(punit0 && tile_visible_mapcanvas(punit0->x, punit0->y) &&
      punit1 && tile_visible_mapcanvas(punit1->x, punit1->y)) {
-    struct unit *pfocus;
-    pfocus=get_unit_in_focus();
-  
     decrease_unit_hp_smooth(punit0, packet->attacker_hp,
 			    punit1, packet->defender_hp);
-    set_unit_focus(pfocus);
   }
 }
 
diff -ur freeciv/client/tilespec.c show_transporter_on_top2/client/tilespec.c
--- freeciv/client/tilespec.c	Mon Mar 13 14:08:08 2000
+++ show_transporter_on_top2/client/tilespec.c	Wed Mar 15 17:34:49 2000
@@ -934,7 +934,7 @@
       return sprs - save_sprs;
     }
 
-    if((punit=player_find_visible_unit(game.player_ptr, ptile))) {
+    if ((punit=find_visible_unit(ptile))) {
       if(!citymode || punit->owner!=game.player_idx) {
         sprs += fill_unit_sprite_array(sprs,punit);
         if(unit_list_size(&ptile->units)>1)
@@ -1152,7 +1152,7 @@
       sprs+=fill_city_sprite_array(sprs,pcity);
     }
 
-    if((punit=player_find_visible_unit(game.player_ptr, ptile))) {
+    if ((punit=find_visible_unit(ptile))) {
       if(pcity && punit!=get_unit_in_focus()) return sprs - save_sprs;
       if(!citymode || punit->owner!=game.player_idx) {
         sprs+=fill_unit_sprite_array(sprs,punit);
diff -ur freeciv/common/player.c show_transporter_on_top2/common/player.c
--- freeciv/common/player.c	Mon Mar 13 14:07:24 2000
+++ show_transporter_on_top2/common/player.c	Tue Mar 14 15:22:38 2000
@@ -180,20 +180,6 @@
 }
 
 /***************************************************************
-  Return a pointer to a visible unit, if there is one.
-***************************************************************/
-struct unit *player_find_visible_unit(struct player *pplayer, struct tile *ptile)
-{
-  if(unit_list_size(&ptile->units)==0) return NULL;
-
-  unit_list_iterate(ptile->units, punit)
-    if(player_can_see_unit(pplayer, punit)) return punit;
-  unit_list_iterate_end;
-
-  return NULL;
-}
-
-/***************************************************************
  If the specified player owns the city with the specified id,
  return pointer to the city struct.  Else return 0.
  In the server we want to use find_city_by_id, which is fast due
diff -ur freeciv/common/player.h show_transporter_on_top2/common/player.h
--- freeciv/common/player.h	Mon Mar 13 14:07:24 2000
+++ show_transporter_on_top2/common/player.h	Tue Mar 14 15:22:38 2000
@@ -157,7 +157,6 @@
 int player_has_embassy(struct player *pplayer, struct player *pplayer2);
 
 int player_can_see_unit(struct player *pplayer, struct unit *punit);
-struct unit *player_find_visible_unit(struct player *pplayer, struct tile *);
 int player_owns_city(struct player *pplayer, struct city *pcity);
 
 struct city *player_find_city_by_id(struct player *pplayer, int city_id);