L L4D2node

CNavArea::Contains

0x006fc4c0 · 301 bytes · __thiscall

_ZNK8CNavArea8ContainsERK6Vector

Decompiled

undefined (2 params)

/* CNavArea::Contains(Vector const&) const */

undefined4 __thiscall CNavArea::Contains(CNavArea *this,Vector *param_1)

{
  float fVar1;
  float fVar2;
  float fVar3;
  int iVar4;
  int iVar5;
  CNavArea *this_00;
  int iVar6;
  longdouble lVar7;
  longdouble lVar8;
  
  fVar1 = *(float *)param_1;
  if ((((*(float *)(this + 4) <= fVar1) &&
       (fVar1 < *(float *)(this + 0x10) || fVar1 == *(float *)(this + 0x10))) &&
      (fVar2 = *(float *)(param_1 + 4), *(float *)(this + 8) <= fVar2)) &&
     (fVar2 < *(float *)(this + 0x14) || fVar2 == *(float *)(this + 0x14))) {
    lVar7 = (longdouble)GetZ(this,fVar1,fVar2);
    fVar3 = *(float *)(param_1 + 8);
    if ((float)lVar7 - 18.0 <= fVar3) {
      iVar4 = *(int *)(this + 0x104);
      if (0 < iVar4) {
        iVar5 = *(int *)(this + 0xfc);
        iVar6 = 0;
        do {
          this_00 = *(CNavArea **)(iVar5 + iVar6 * 4);
          if (((this_00 != this) && (*(float *)(this_00 + 4) <= fVar1)) &&
             ((fVar1 < *(float *)(this_00 + 0x10) || fVar1 == *(float *)(this_00 + 0x10) &&
              ((*(float *)(this_00 + 8) <= fVar2 &&
               (fVar2 < *(float *)(this_00 + 0x14) || fVar2 == *(float *)(this_00 + 0x14))))))) {
            lVar8 = (longdouble)GetZ(this_00,fVar1,fVar2);
            if (((float)lVar8 <= fVar3) && ((float)lVar7 < (float)lVar8)) {
              return 0;
            }
          }
          iVar6 = iVar6 + 1;
        } while (iVar6 != iVar4);
      }
      return 1;
    }
  }
  return 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)