]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Get rid of hardcoded "Player" string for checking whether the name needs changing...
authorRudolf Polzer <divVerent@xonotic.org>
Mon, 8 Dec 2014 11:17:13 +0000 (12:17 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Mon, 8 Dec 2014 11:18:30 +0000 (12:18 +0100)
qcsrc/menu/xonotic/dialog_firstrun.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c
qcsrc/menu/xonotic/mainwindow.c

index 1b975da2b188c8fd27098897d5553fc1d80b3245..90988703e0e5f9fa491ef0759e2a95a358b7fec3 100644 (file)
@@ -17,7 +17,7 @@ ENDCLASS(XonoticFirstRunDialog)
 #ifdef IMPLEMENTATION
 float CheckFirstRunButton(entity me)
 {
-       if(cvar_string("_cl_name") != "Player")
+       if(cvar_string("_cl_name") != cvar_defstring("_cl_name"))
                return 1;
 
        if(cvar_string("_menu_prvm_language") != prvm_language)
index f4bd359ece79d350a1034427607a470a7dd374db..fd4e5cd19bba87545425e15de98b38477d8d4612 100644 (file)
@@ -22,7 +22,7 @@ entity makeXonoticPlayerSettingsTab()
 }
 void XonoticPlayerSettingsTab_draw(entity me)
 {
-       if(cvar_string("_cl_name") == "Player")
+       if(cvar_string("_cl_name") == cvar_defstring("_cl_name"))
                me.playerNameLabel.alpha = ((mod(time * 2, 2) < 1) ? 1 : 0);
        else
                me.playerNameLabel.alpha = me.playerNameLabelAlpha;
index 5c58025fca1f5e3ac87501e585ffee2828e7aed3..dcc4a8a81729e440fbf042ddc448d4f16a83cbb2 100644 (file)
@@ -256,7 +256,7 @@ void MainWindow_configureMainWindow(entity me)
 
        me.initializeDialog(me, n);
 
-       if(cvar_string("_cl_name") == "Player")
+       if(cvar_string("_cl_name") == cvar_defstring("_cl_name"))
                me.dialogToShow = me.firstRunDialog;
 }
 #endif