engine: client: send engine build information to masterserver

This commit is contained in:
SNMetamorph 2024-06-10 19:48:02 +04:00 committed by Alibek Omarov
parent f4b4546197
commit ec5e9cb6e3

View file

@ -1635,8 +1635,16 @@ static size_t NONNULL CL_BuildMasterServerScanRequest( char *buf, size_t size, u
#ifndef XASH_ALL_SERVERS #ifndef XASH_ALL_SERVERS
Info_SetValueForKey( info, "gamedir", GI->gamefolder, remaining ); Info_SetValueForKey( info, "gamedir", GI->gamefolder, remaining );
#endif #endif
Info_SetValueForKey( info, "clver", XASH_VERSION, remaining ); // let master know about client version // let master know about client version
Info_SetValueForKey( info, "clver", XASH_VERSION, remaining );
Info_SetValueForKey( info, "nat", nat ? "1" : "0", remaining ); Info_SetValueForKey( info, "nat", nat ? "1" : "0", remaining );
Info_SetValueForKey( info, "commit", Q_buildcommit(), remaining );
Info_SetValueForKey( info, "branch", Q_buildbranch(), remaining );
Info_SetValueForKey( info, "os", Q_buildos(), remaining );
Info_SetValueForKey( info, "arch", Q_buildarch(), remaining );
Q_snprintf( temp, sizeof( temp ), "%d", Q_buildnum() );
Info_SetValueForKey( info, "buildnum", temp, remaining );
Q_snprintf( temp, sizeof( temp ), "%x", *key ); Q_snprintf( temp, sizeof( temp ), "%x", *key );
Info_SetValueForKey( info, "key", temp, remaining ); Info_SetValueForKey( info, "key", temp, remaining );