]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
ToS: Don't show if there's no version for now
authorz411 <z411@omaera.org>
Wed, 24 Nov 2021 06:19:55 +0000 (03:19 -0300)
committerz411 <z411@omaera.org>
Wed, 24 Nov 2021 06:19:55 +0000 (03:19 -0300)
qcsrc/menu/xonotic/dialog_termsofservice.qc

index 568fdedfc044f352cf3993ec57fd095867c2e3ec..c0375b224d7ac929f2e7f8d73c954fd37f7f7f6b 100644 (file)
 
 void Close_Clicked(entity btn, entity me)
 {
-       LOG_INFO("Setting _termsofservice_accepted to ", _Nex_ExtResponseSystem_NewToS);
+       LOG_INFO("Setting _termsofservice_accepted cvar to ", _Nex_ExtResponseSystem_NewToS);
     cvar_set("_termsofservice_accepted", _Nex_ExtResponseSystem_NewToS);
     localcmd("saveconfig");
     if (main.firstRunDialog.shouldShow())
-    {
                main.firstDraw = true;
-    }
     Dialog_Close(btn, me);
 }
 
@@ -74,7 +72,7 @@ void XonoticToS_OnGet(entity fh, entity me, int status)
 bool XonoticToSDialog_shouldShow()
 {
        LOG_INFO("newtos value: ", _Nex_ExtResponseSystem_NewToS);
-       return (_Nex_ExtResponseSystem_NewToS != autocvar__termsofservice_accepted);
+       return (_Nex_ExtResponseSystem_NewToS != "" && _Nex_ExtResponseSystem_NewToS != autocvar__termsofservice_accepted);
 }
 
 void XonoticToSDialog_fill(entity me)