diff --git a/common/net_api.h b/common/net_api.h index 3a8229df..db2c7c10 100644 --- a/common/net_api.h +++ b/common/net_api.h @@ -27,6 +27,7 @@ // Set this flag for things like broadcast requests, etc. where the engine should not // kill the request hook after receiving the first response #define FNETAPI_MULTIPLE_RESPONSE ( 1<<0 ) +#define FNETAPI_LEGACY_PROTOCOL ( 1<<1 ) // xash3d-fwgs extension struct net_response_s; typedef void (*net_api_response_func_t) ( struct net_response_s *response ); diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index 400974f3..32455128 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -3467,7 +3467,7 @@ static void GAME_EXPORT NetAPI_SendRequest( int context, int request, int flags, nr->flags = flags; // local servers request - Q_snprintf( req, sizeof( req ), "netinfo %i %i %i", PROTOCOL_VERSION, context, request ); + Q_snprintf( req, sizeof( req ), "netinfo %i %i %i", FBitSet( flags, FNETAPI_LEGACY_PROTOCOL ) ? PROTOCOL_LEGACY_VERSION : PROTOCOL_VERSION, context, request ); Netchan_OutOfBandPrint( NS_CLIENT, nr->resp.remote_address, "%s", req ); }