QTfrontend/util/namegen.cpp
changeset 12635 11f5fe0407e5
parent 12510 82c75a317d48
child 13915 6c8d4e140f27
--- a/QTfrontend/util/namegen.cpp	Sun Oct 01 09:42:17 2017 +0200
+++ b/QTfrontend/util/namegen.cpp	Mon Oct 02 15:43:45 2017 +0200
@@ -75,8 +75,6 @@
     // the hat will influence which names the hogs get
     int kind = (rand()%(TypesHatnames.size()));
 
-    // pick team name based on hat
-    team.setName(getRandomTeamName(kind));
     team.setGrave(getRandomGrave());
     team.setFort(getRandomFort());
     team.setFlag(getRandomFlag());
@@ -137,6 +135,14 @@
         HWNamegen::teamRandomHogName(team,i,dict);
     }
 
+    // If using themed hats, use themed team name.
+    // Otherwise, only use “generic” team names from the first team
+    // in types.txt.
+    if (randomMode == 0)
+        team.setName(getRandomTeamName(kind));
+    else
+        team.setName(getRandomTeamName(0));
+
 }
 
 // Set random hats for entire team