L L4D2node

KeyValues::EvaluateConditional

0x0024d260 · 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_003f41a0;
  Warning("KeyValues Error: %s in file %s\n","KV Conditional Evaluation Error",DAT_003f41a0);
  if (0 < DAT_003f41a8) {
    do {
      while ((0x3f < iVar4 || ((&g_KeyValuesErrorStack)[iVar4] == -1))) {
LAB_0024d300:
        iVar4 = iVar4 + 1;
        if (DAT_003f41a8 <= iVar4) goto LAB_0024d358;
      }
      if (iVar4 < DAT_003f41a4) {
        piVar3 = (int *)KeyValuesSystem();
        pcVar5 = (char *)(**(code **)(*piVar3 + 0x18))(piVar3,(&g_KeyValuesErrorStack)[iVar4]);
        Warning(&DAT_002cc2a4,pcVar5,uVar6);
        goto LAB_0024d300;
      }
      piVar3 = (int *)KeyValuesSystem();
      puVar1 = &g_KeyValuesErrorStack + iVar4;
      iVar4 = iVar4 + 1;
      pcVar5 = (char *)(**(code **)(*piVar3 + 0x18))(piVar3,*puVar1);
      Warning(&DAT_002cc2a9,pcVar5,uVar6);
    } while (iVar4 < DAT_003f41a8);
  }
LAB_0024d358:
  Warning("\n",pcVar5,uVar6);
  return local_d[0];
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)