1.1 --- a/metamod/engine_api.cpp Wed Feb 01 11:55:50 2006 +0000
1.2 +++ b/metamod/engine_api.cpp Fri Feb 03 04:20:53 2006 +0000
1.3 @@ -877,13 +877,18 @@
1.4 RETURN_API_void();
1.5 }
1.6
1.7 +static bool g_check = false;
1.8 +
1.9 //Added 2005-11-22 (no SDK update)
1.10 void mm_QueryClientCvarValue2(const edict_t *pEdict, const char *cvarName, int requestId)
1.11 {
1.12 //Engine version didn't change when this API was added. Check if the pointer is valid.
1.13 - if (g_engfuncs.pfnQueryClientCvarValue2 &&
1.14 + if (!g_check && g_engfuncs.pfnQueryClientCvarValue2 &&
1.15 !IS_VALID_PTR((void * )g_engfuncs.pfnQueryClientCvarValue2))
1.16 + {
1.17 g_engfuncs.pfnQueryClientCvarValue2 = NULL;
1.18 + g_check = true;
1.19 + }
1.20
1.21 META_ENGINE_HANDLE_void(FN_QUERYCLIENTCVARVALUE2, pfnQueryClientCvarValue2, (pEdict, cvarName, requestId));
1.22 RETURN_API_void();