mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
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
|
// default metamod does not call this if the gamedll doesn't provide it
|
||||||
g_NewDLL_Available = true;
|
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
|
#ifdef FAKEMETA
|
||||||
return g_FakeMeta.GetNewDLLFunctions(pNewFunctionTable, interfaceVersion, &gNewDLLFunctionTable);
|
return g_FakeMeta.GetNewDLLFunctions(pNewFunctionTable, interfaceVersion, &gNewDLLFunctionTable);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user