Now checks whether there is a non-zero g_engfuncs.pfnQueryClientCvarValue before setting newdll's pfnCvarValue function pointer
This commit is contained in:
parent
af79fe8e20
commit
66b95f64a5
@ -1407,7 +1407,11 @@ C_DLLEXPORT int GetNewDLLFunctions(NEW_DLL_FUNCTIONS *pNewFunctionTable, int *in
|
||||
// default metamod does not call this if the gamedll doesn't provide it
|
||||
g_NewDLL_Available = true;
|
||||
|
||||
gNewDLLFunctionTable.pfnCvarValue = C_CvarValue;
|
||||
// If pfnQueryClientCvarValue is not available, the newdllfunctions table will probably
|
||||
// not have the pfnCvarValue member -> better don't write there to avoid corruption
|
||||
if (g_engfuncs.pfnQueryClientCvarValue)
|
||||
gNewDLLFunctionTable.pfnCvarValue = C_CvarValue;
|
||||
|
||||
#ifdef FAKEMETA
|
||||
return g_FakeMeta.GetNewDLLFunctions(pNewFunctionTable, interfaceVersion, &gNewDLLFunctionTable);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user