L L4D2node

CExpressionCalculator::ParseConditional

0x0026fa80 · 276 bytes · __thiscall

_ZN21CExpressionCalculator16ParseConditionalERPKc

Decompiled

undefined (2 params)

/* CExpressionCalculator::ParseConditional(char const*&) */

undefined4 __thiscall
CExpressionCalculator::ParseConditional(CExpressionCalculator *this,char **param_1)

{
  int iVar1;
  float fVar2;
  char *pcVar3;
  undefined4 uVar4;
  int iVar5;
  int iVar6;
  char cVar7;
  undefined4 uVar8;
  undefined4 uVar9;
  float *pfVar10;
  float local_24;
  float local_20 [4];
  
  pcVar3 = *param_1;
  uVar4 = *(undefined4 *)(this + 0x44);
  uVar8 = ParseOr(this,param_1);
  if ((char)uVar8 == '\0') {
    *(undefined4 *)(this + 0x44) = uVar4;
    *param_1 = pcVar3;
    return uVar8;
  }
  pcVar3 = *param_1;
  uVar4 = *(undefined4 *)(this + 0x44);
  cVar7 = ParseString(param_1,"?");
  if ((((cVar7 != '\0') && (cVar7 = ParseExpr(this,param_1), cVar7 != '\0')) &&
      (cVar7 = ParseString(param_1,":"), cVar7 != '\0')) &&
     (uVar9 = ParseExpr(this,param_1), (char)uVar9 != '\0')) {
    iVar5 = *(int *)(this + 0x44);
    iVar6 = *(int *)(this + 0x38);
    iVar1 = iVar5 + -1;
    local_24 = *(float *)(iVar6 + iVar1 * 4);
    *(int *)(this + 0x44) = iVar1;
    local_20[0] = *(float *)(iVar6 + -4 + iVar1 * 4);
    *(int *)(this + 0x44) = iVar5 + -2;
    fVar2 = *(float *)(iVar6 + -8 + iVar1 * 4);
    *(int *)(this + 0x44) = iVar5 + -3;
    pfVar10 = &local_24;
    if (fVar2 != 0.0) {
      pfVar10 = local_20;
    }
    CUtlStack<float,CUtlMemory<float,int>>::Push
              ((CUtlStack<float,CUtlMemory<float,int>> *)(this + 0x38),pfVar10);
    return uVar9;
  }
  *(undefined4 *)(this + 0x44) = uVar4;
  *param_1 = pcVar3;
  return uVar8;
}

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)