engine: server: updated TSource query to be more compatible with GoldSrc standard (#497)

Mark TSource queries as connectionless.
Only send Windows as the os if the engine was built on it.
This commit is contained in:
lilmayofuksu 2021-06-16 13:09:31 +03:00 committed by GitHub
parent e9712fc24f
commit 2ad209b973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2182,6 +2182,7 @@ void SV_TSourceEngineQuery( netadr_t from )
MSG_Init( &buf, "TSourceEngineQuery", answer, sizeof( answer ));
MSG_WriteLong( &buf, -1 ); // Mark as connectionless
MSG_WriteByte( &buf, 'm' );
MSG_WriteString( &buf, NET_AdrToString( net_local ));
MSG_WriteString( &buf, hostname.string );
@ -2192,8 +2193,11 @@ void SV_TSourceEngineQuery( netadr_t from )
MSG_WriteByte( &buf, svs.maxclients );
MSG_WriteByte( &buf, PROTOCOL_VERSION );
MSG_WriteByte( &buf, Host_IsDedicated() ? 'D' : 'L' );
#if defined(_WIN32)
MSG_WriteByte( &buf, 'W' );
#else
MSG_WriteByte( &buf, 'L' );
#endif
if( Q_stricmp( GI->gamefolder, "valve" ))
{
MSG_WriteByte( &buf, 1 ); // mod