KeyValues::EvaluateConditional
0x00b6e2a0 · 264 bytes · __thiscall
_ZN9KeyValues19EvaluateConditionalEPKc
Decompiled
undefined (2 params)
/* KeyValues::EvaluateConditional(char const*) */
undefined1 __thiscall KeyValues::EvaluateConditional(KeyValues *this,char *param_1)
{
undefined4 *puVar1;
char cVar2;
int *piVar3;
int iVar4;
char *pcVar5;
undefined4 uVar6;
bool local_d [5];
local_d[0] = false;
cVar2 = CExpressionEvaluator::Evaluate
((CExpressionEvaluator *)g_ExpressionEvaluator,local_d,param_1,
*(_func_bool_char_ptr **)(this + 0x28),(_func_void_char_ptr *)0x0);
if (cVar2 != '\0') {
return local_d[0];
}
pcVar5 = "KV Conditional Evaluation Error";
iVar4 = 0;
uVar6 = DAT_01045720;
Warning("KeyValues Error: %s in file %s\n","KV Conditional Evaluation Error",DAT_01045720);
if (0 < DAT_01045728) {
do {
while ((0x3f < iVar4 || ((&g_KeyValuesErrorStack)[iVar4] == -1))) {
LAB_00b6e340:
iVar4 = iVar4 + 1;
if (DAT_01045728 <= iVar4) goto LAB_00b6e398;
}
if (iVar4 < DAT_01045724) {
piVar3 = (int *)KeyValuesSystem();
pcVar5 = (char *)(**(code **)(*piVar3 + 0x18))(piVar3,(&g_KeyValuesErrorStack)[iVar4]);
Warning("%s, ",pcVar5,uVar6);
goto LAB_00b6e340;
}
piVar3 = (int *)KeyValuesSystem();
puVar1 = &g_KeyValuesErrorStack + iVar4;
iVar4 = iVar4 + 1;
pcVar5 = (char *)(**(code **)(*piVar3 + 0x18))(piVar3,*puVar1);
Warning("(*%s*), ",pcVar5,uVar6);
} while (iVar4 < DAT_01045728);
}
LAB_00b6e398:
Warning(&DAT_00cff71e,pcVar5,uVar6);
return local_d[0];
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.