L L4D2node

rr2::CRuleBuilder::ReserveDynamicCriteria

0x00bd9ab0 · 133 bytes · __thiscall

_ZN3rr212CRuleBuilder22ReserveDynamicCriteriaEib

Decompiled

undefined (3 params)

/* rr2::CRuleBuilder::ReserveDynamicCriteria(int, bool) */

void __thiscall
rr2::CRuleBuilder::ReserveDynamicCriteria(CRuleBuilder *this,int param_1,bool param_2)

{
  int iVar1;
  void *pvVar2;
  uint uVar3;
  
  iVar1 = *(int *)(this + 4);
  if (!param_2) {
    uVar3 = *(uint *)(iVar1 + 0x44) / 0x14;
    if ((int)uVar3 < (int)(param_1 + uVar3)) {
      uVar3 = param_1 + uVar3;
    }
    pvVar2 = realloc(*(void **)(iVar1 + 0x40),uVar3 * 0x14);
    *(uint *)(iVar1 + 0x44) = uVar3 * 0x14;
    *(void **)(iVar1 + 0x40) = pvVar2;
    *(void **)(iVar1 + 0x4c) = pvVar2;
    return;
  }
  uVar3 = *(uint *)(iVar1 + 0x14) / 0x14;
  if ((int)uVar3 < (int)(param_1 + uVar3)) {
    uVar3 = param_1 + uVar3;
  }
  pvVar2 = realloc(*(void **)(iVar1 + 0x10),uVar3 * 0x14);
  *(uint *)(iVar1 + 0x14) = uVar3 * 0x14;
  *(void **)(iVar1 + 0x10) = pvVar2;
  *(void **)(iVar1 + 0x1c) = pvVar2;
  return;
}

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)