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

This patch reinstates the ptype local variable that is needed after
punit is wiped to print the user messages.

Patch against S2_1 r13044

Index: server/unittools.c
===================================================================
--- server/unittools.c	(revision 13044)
+++ server/unittools.c	(arbetskopia)
@@ -1468,6 +1470,7 @@
   bool wipe_cargo = TRUE; /* This used to be a function parameter. */
   struct tile *ptile = punit->tile;
   struct player *pplayer = unit_owner(punit);
+  struct unit_type *ptype = unit_type(punit);
 
   /* First pull all units off of the transporter. */
   if (get_transporter_capacity(punit) > 0) {
@@ -1528,7 +1531,7 @@
                             _("%s escaped the destruction of %s, and "
                               "fled to %s."),
                             unit_name_translation(pcargo),
-                            unit_name_translation(punit),
+                            utype_name_translation(ptype),
                             pcity->name);
 	    }
 	  }
@@ -1536,7 +1539,7 @@
 	    notify_player(pplayer, ptile, E_UNIT_LOST,
 			     _("%s lost when %s was lost."),
 			     unit_name_translation(pcargo),
-			     unit_name_translation(punit));
+			     utype_name_translation(ptype));
 	    server_remove_unit(pcargo);
 	  }
 	  if (++capacity >= 0) {
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to