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

 If there is more than one barbarian nation, player name is chosen
from wrong nation when barbarians reborn. Fix for S2_1 attached.
 #34111 will fix this for trunk.


 - ML

diff -Nurd -X.diff_ignore freeciv/server/barbarian.c freeciv/server/barbarian.c
--- freeciv/server/barbarian.c	2007-01-24 20:32:27.000000000 +0200
+++ freeciv/server/barbarian.c	2007-01-28 13:35:41.000000000 +0200
@@ -116,7 +116,7 @@
 {
   int newplayer = game.info.nplayers;
   struct player *barbarians;
-  struct nation_type *nation = pick_barbarian_nation();
+  struct nation_type *nation;
 
   players_iterate(barbarians) {
     if ((land && is_land_barbarian(barbarians))
@@ -125,7 +125,7 @@
         barbarians->economic.gold = 0;
         barbarians->is_alive = TRUE;
         barbarians->is_dying = FALSE;
-        pick_random_player_name(nation, barbarians->name);
+        pick_random_player_name(barbarians->nation, barbarians->name);
 	sz_strlcpy(barbarians->username, ANON_USER_NAME);
         /* I need to make them to forget the map, I think */
 	whole_map_iterate(ptile) {
@@ -141,6 +141,8 @@
     die("Too many players in server/barbarian.c");
   }
 
+  nation = pick_barbarian_nation();
+
   barbarians = &game.players[newplayer];
 
   /* make a new player */
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to