L L4D2node

CScriptFunctionCriterion::Compare

0x0080e1a0 · 245 bytes · __thiscall

_ZN24CScriptFunctionCriterion7CompareERKN3rr26SymbolERKNS0_8RVariantEPKNS0_14CResponseQueryE

Decompiled

undefined (4 params)

/* CScriptFunctionCriterion::Compare(rr2::Symbol const&, rr2::RVariant const&, rr2::CResponseQuery
   const*) */

uint __thiscall
CScriptFunctionCriterion::Compare
          (CScriptFunctionCriterion *this,Symbol *param_1,RVariant *param_2,CResponseQuery *param_3)

{
  uint uVar1;
  void *local_38;
  void *local_34;
  undefined4 local_30;
  short local_2c;
  ushort local_2a;
  void *local_28;
  undefined4 local_24;
  undefined2 local_20;
  ushort local_1e;
  
  CRuleScriptBridge::ResponseQueryToScript((CRuleScriptBridge *)&local_38,param_3);
  local_2c = 0;
  local_2a = 0;
  local_34 = (void *)0x0;
  local_1e = 0;
  local_24 = 0;
  local_20 = 0x20;
  local_28 = local_38;
                    /* try { // try from 0080e226 to 0080e228 has its CatchHandler @ 0080e295 */
  (**(code **)(*g_pScriptVM + 0x50))
            (g_pScriptVM,*(undefined4 *)(this + 0xc),&local_28,1,&local_34,
             *(undefined4 *)(this + 0x10),1);
  if ((local_1e & 1) != 0) {
    free(local_28);
  }
  uVar1 = 0;
  if (local_2c != 0) {
    uVar1 = (uint)local_34 & 0xff;
  }
  if ((local_2a & 1) != 0) {
    free(local_34);
    local_2a = local_2a & 0xfffe;
  }
  local_34 = (void *)0x0;
  local_2c = 0;
  local_30 = 0;
  if (local_38 != (void *)0x0) {
    (**(code **)(*g_pScriptVM + 0x30))(g_pScriptVM,local_38);
  }
  return uVar1;
}

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)