engine: add NetAPI flag NET_ERROR_FORBIDDEN

This commit is contained in:
Alibek Omarov 2024-07-07 02:05:25 +03:00
parent 7d0467863c
commit b6967a432a
2 changed files with 3 additions and 0 deletions

View file

@ -35,6 +35,7 @@ typedef void (*net_api_response_func_t) ( struct net_response_s *response );
#define NET_ERROR_TIMEOUT ( 1<<0 )
#define NET_ERROR_PROTO_UNSUPPORTED ( 1<<1 )
#define NET_ERROR_UNDEFINED ( 1<<2 )
#define NET_ERROR_FORBIDDEN ( 1<<3 ) // xash3d-fwgs extension
typedef struct net_adrlist_s
{

View file

@ -1880,6 +1880,8 @@ static void CL_ParseNETInfoMessage( netadr_t from, sizebuf_t *msg, const char *s
SetBits( errorBits, NET_ERROR_PROTO_UNSUPPORTED );
else if( !Q_stricmp( val, "undefined" ))
SetBits( errorBits, NET_ERROR_UNDEFINED );
else if( !Q_stricmp( val, "forbidden" ))
SetBits( errorBits, NET_ERROR_FORBIDDEN );
CL_FixupColorStringsForInfoString( s, infostring );