MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / SM_CvarExistsInPlugin

Function SM_CvarExistsInPlugin

core/CoreConfig.cpp:402–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402bool SM_CvarExistsInPlugin(List<const ConVar *> &convars, const char *cvar_name)
403{
404 for (List<const ConVar *>::iterator iter = convars.begin(); iter != convars.end(); iter++)
405 {
406 const ConVar *cvar = (*iter);
407#if SOURCE_ENGINE >= SE_ORANGEBOX
408 if (cvar->IsFlagSet(FCVAR_DONTRECORD))
409#else
410 if (cvar->IsBitSet(FCVAR_DONTRECORD))
411#endif
412 {
413 continue;
414 }
415
416 if (strcasecmp(cvar_name, cvar->GetName()) == 0)
417 {
418 return true;
419 }
420 }
421
422 return false;
423}
424
425bool SM_ConfigCheckRegeneration(
426 const char *file,

Callers 1

Calls 3

beginMethod · 0.45
endMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected