From: TimePath Date: Thu, 17 Dec 2015 21:48:39 +0000 (+1100) Subject: Initialize maxclients earlier, fixes #1609 X-Git-Tag: xonotic-v0.8.2~1484 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4550feecc14a871e2fa351bf6bec371ef4a80433;p=xonotic%2Fxonotic-data.pk3dir.git Initialize maxclients earlier, fixes #1609 --- diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 2009388da..4be14ad5c 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -42,6 +42,14 @@ void CSQC_Init() LOG_INFOF("^4CSQC Build information: ^1%s\n", WATERMARK); #endif + { + int i = 0; + for ( ; i < 255; ++i) + if (getplayerkeyvalue(i, "viewentity") == "") + break; + maxclients = i; + } + // needs to be done so early because of the constants they create static_init(); static_init_late(); @@ -54,14 +62,6 @@ void CSQC_Init() draw_endBoldFont(); - { - int i = 0; - for ( ; i < 255; ++i) - if (getplayerkeyvalue(i, "viewentity") == "") - break; - maxclients = i; - } - //registercommand("hud_configure"); //registercommand("hud_save"); //registercommand("menu_action");