From a95467e68930a0531ac1893dd4411a195e484d2d Mon Sep 17 00:00:00 2001 From: Freddy Date: Sat, 19 Feb 2022 14:50:17 +0100 Subject: [PATCH] ToS: only load Xonotic ToS when actually needed --- qcsrc/menu/xonotic/dialog_termsofservice.qc | 1 - qcsrc/menu/xonotic/mainwindow.qc | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qcsrc/menu/xonotic/dialog_termsofservice.qc b/qcsrc/menu/xonotic/dialog_termsofservice.qc index 39ffaa43c..0fec38a89 100644 --- a/qcsrc/menu/xonotic/dialog_termsofservice.qc +++ b/qcsrc/menu/xonotic/dialog_termsofservice.qc @@ -86,7 +86,6 @@ void XonoticToSDialog_fill(entity me) me.TR(me); me.TR(me); me.TD(me, me.rows - 4, me.columns, me.textBox = makeXonoticTextBox()); - me.loadXonoticToS(me); me.TR(me); me.gotoRC(me, me.rows - 1, 0); diff --git a/qcsrc/menu/xonotic/mainwindow.qc b/qcsrc/menu/xonotic/mainwindow.qc index 4aa974835..f5d2aca98 100644 --- a/qcsrc/menu/xonotic/mainwindow.qc +++ b/qcsrc/menu/xonotic/mainwindow.qc @@ -61,7 +61,10 @@ void MainWindow_draw(entity me) if (me.firstDraw) { if (me.ToSDialog.shouldShow()) + { + me.ToSDialog.loadXonoticToS(me.ToSDialog); DialogOpenButton_Click_withCoords(NULL, me.ToSDialog, '0 0 0', eX * conwidth + eY * conheight); + } else if(me.firstRunDialog.shouldShow()) DialogOpenButton_Click_withCoords(NULL, me.firstRunDialog, '0 0 0', eX * conwidth + eY * conheight); -- 2.39.2