From: Freddy Date: Sat, 18 Apr 2020 15:08:33 +0000 (+0200) Subject: Don't show ToS dialog if the file can't be opened X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5975cc87131e1a8e99769f5b94aa29ef1dbb918b;p=xonotic%2Fxonotic-data.pk3dir.git Don't show ToS dialog if the file can't be opened --- diff --git a/qcsrc/menu/xonotic/dialog_termsofservice.qc b/qcsrc/menu/xonotic/dialog_termsofservice.qc index e04b2fda6..c925dbccd 100644 --- a/qcsrc/menu/xonotic/dialog_termsofservice.qc +++ b/qcsrc/menu/xonotic/dialog_termsofservice.qc @@ -37,14 +37,14 @@ void XonoticToSDialog_loadXonoticToS(entity me) ToSText = line; } } + fclose(fh); } - fclose(fh); me.textBox.setText(me.textBox, ToSText); } bool XonoticToSDialog_shouldShow() { - return !autocvar__termsofservice_accepted; + return (fexists("TermsOfService") && !autocvar__termsofservice_accepted); } void XonoticToSDialog_fill(entity me)