Browse Source

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.
pull/2/head
lilmayofuksu 4 years ago committed by GitHub
parent
commit
2ad209b973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      engine/server/sv_client.c

6
engine/server/sv_client.c

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

Loading…
Cancel
Save