From 5c6d30854a2220a568f2eb751ca4704bc4f126cb Mon Sep 17 00:00:00 2001 From: z411 Date: Wed, 24 Nov 2021 03:19:55 -0300 Subject: [PATCH] ToS: Don't show if there's no version for now --- qcsrc/menu/xonotic/dialog_termsofservice.qc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qcsrc/menu/xonotic/dialog_termsofservice.qc b/qcsrc/menu/xonotic/dialog_termsofservice.qc index 568fdedfc..c0375b224 100644 --- a/qcsrc/menu/xonotic/dialog_termsofservice.qc +++ b/qcsrc/menu/xonotic/dialog_termsofservice.qc @@ -10,13 +10,11 @@ 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) -- 2.39.2