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 1b975da..9098870 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 f4bd359..fd4e5cd 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 5c58025..dcc4a8a 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