Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2006:
[Freeciv-Dev] (PR#17603) Make username default name for human players
Home

[Freeciv-Dev] (PR#17603) Make username default name for human players

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#17603) Make username default name for human players
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sat, 3 Jun 2006 12:14:49 -0700
Reply-to: bugs@xxxxxxxxxxx

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

Make username the default player name for human players when no nation has 
been picked. Requested frequently.

   - Per
Index: server/srv_main.c
===================================================================
--- server/srv_main.c   (revision 12006)
+++ server/srv_main.c   (working copy)
@@ -1527,7 +1527,11 @@
 
     pplayer->city_style = get_nation_city_style(pplayer->nation);
 
-    pick_random_player_name(pplayer->nation, player_name);
+    if (pplayer->ai.control) {
+      pick_random_player_name(pplayer->nation, player_name);
+    } else {
+      sz_strlcpy(player_name, pplayer->username);
+    }
     sz_strlcpy(pplayer->name, player_name);
 
     if (check_nation_leader_name(pplayer->nation, player_name)) {

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#17603) Make username default name for human players, Per I. Mathisen <=