Add cvar to skip unicode check(Same as 4cdb80dce7)

This commit is contained in:
Night Owl 2019-01-18 17:41:41 +05:00 committed by Alibek Omarov
parent c041db9909
commit 86229f7926
2 changed files with 7 additions and 0 deletions

View File

@ -51,6 +51,7 @@ extern int gmsgSayText;
extern int gmsgBhopcap;
extern cvar_t allow_spectators;
extern cvar_t multibyte_only;
extern int g_teamplay;
@ -287,6 +288,10 @@ decodeFinishedMaybeCESU8:
bool Q_UnicodeValidate( const char *pUTF8 )
{
bool bError = false;
if( !multibyte_only.value )
return true;
while( *pUTF8 )
{
unsigned int uVal;

View File

@ -43,6 +43,7 @@ cvar_t allowmonsters = { "mp_allowmonsters","0", FCVAR_SERVER };
cvar_t bhopcap = { "mp_bhopcap", "1", FCVAR_SERVER };
cvar_t allow_spectators = { "allow_spectators", "0", FCVAR_SERVER }; // 0 prevents players from being spectators
cvar_t multibyte_only = { "mp_multibyte_only", "0", FCVAR_SERVER };
cvar_t mp_chattime = { "mp_chattime","10", FCVAR_SERVER };
@ -480,6 +481,7 @@ void GameDLLInit( void )
CVAR_REGISTER( &defaultteam );
CVAR_REGISTER( &allowmonsters );
CVAR_REGISTER( &bhopcap );
CVAR_REGISTER( &multibyte_only );
CVAR_REGISTER( &mp_chattime );