Initialize demo_protocols from the com_protocol integer value

This commit is contained in:
smallmodel 2023-08-21 00:19:46 +02:00
parent 94ab4a5ac5
commit efce4703ca
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -49,7 +49,7 @@ cvar_t *g_scriptcheck;
cvar_t *g_showopcodes;
int demo_protocols[] =
{ 8, 0 };
{ 0, 0 }; // the first value of the array will be replaced by com_protocol
#define MAX_NUM_ARGVS 50
@ -1757,6 +1757,8 @@ void Com_Init( char *commandLine ) {
con_autochat = Cvar_Get("con_autochat", "1", CVAR_ARCHIVE);
#endif
demo_protocols[0] = com_protocol->integer;
Sys_Init();
Netchan_Init( Com_Milliseconds() & 0xffff ); // pick a port value that should be nice and random
SV_Init();