mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 08:08:02 +00:00
engine: server: pre-process string before passing it to PhysicAPI AllocString, for compatibility with existing Xash3D games
This commit is contained in:
parent
e1cbf96100
commit
72fe214f49
@ -3219,7 +3219,18 @@ string_t GAME_EXPORT SV_AllocString( const char *szValue )
|
|||||||
int cmp;
|
int cmp;
|
||||||
|
|
||||||
if( svgame.physFuncs.pfnAllocString != NULL )
|
if( svgame.physFuncs.pfnAllocString != NULL )
|
||||||
return svgame.physFuncs.pfnAllocString( szValue );
|
{
|
||||||
|
string_t i;
|
||||||
|
|
||||||
|
newString = Mem_Malloc( svgame.stringspool, SV_ProcessString( NULL, szValue ));
|
||||||
|
|
||||||
|
SV_ProcessString( newString, szValue );
|
||||||
|
i = svgame.physFuncs.pfnAllocString( newString );
|
||||||
|
|
||||||
|
Mem_Free( newString );
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef XASH_64BIT
|
#ifdef XASH_64BIT
|
||||||
cmp = 1;
|
cmp = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user