L L4D2node

QueryCacheKey_t::Matches

0x0049cf90 · 227 bytes · __thiscall

_ZNK15QueryCacheKey_t7MatchesEPKS_

Decompiled

undefined (2 params)

/* QueryCacheKey_t::Matches(QueryCacheKey_t const*) const */

undefined4 __thiscall QueryCacheKey_t::Matches(QueryCacheKey_t *this,QueryCacheKey_t *param_1)

{
  int iVar1;
  uint uVar2;
  undefined4 uVar3;
  undefined *puVar4;
  int iVar5;
  int iVar6;
  int local_14;
  
  uVar3 = 0;
  if ((((*(int *)param_1 == *(int *)this) && (*(int *)(param_1 + 0x44) == *(int *)(this + 0x44))) &&
      (*(int *)(param_1 + 0x50) == *(int *)(this + 0x50))) &&
     ((iVar1 = *(int *)(param_1 + 4), iVar1 == *(int *)(this + 4) &&
      (*(float *)(param_1 + 0x54) == *(float *)(this + 0x54))))) {
    if (0 < iVar1) {
      iVar6 = 0;
      do {
        uVar2 = *(uint *)(this + iVar6 * 4 + 0x2c);
        local_14 = 0;
        if (((uVar2 != 0xffffffff) &&
            (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar4 + 8) == uVar2 >> 0xc)) {
          local_14 = *(int *)(puVar4 + 4);
        }
        iVar5 = 0;
        uVar2 = *(uint *)(param_1 + iVar6 * 4 + 0x2c);
        if (((uVar2 != 0xffffffff) &&
            (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar4 + 8) == uVar2 >> 0xc)) {
          iVar5 = *(int *)(puVar4 + 4);
        }
        if ((local_14 != iVar5) ||
           (*(int *)(param_1 + iVar6 * 4 + 0x38) != *(int *)(this + iVar6 * 4 + 0x38))) {
          return 0;
        }
        iVar6 = iVar6 + 1;
      } while (iVar6 != iVar1);
    }
    uVar3 = 1;
  }
  return uVar3;
}

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)