mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-20 12:00:47 +00:00
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:
parent
e9712fc24f
commit
2ad209b973
@ -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…
x
Reference in New Issue
Block a user