L L4D2node

CInferno::IsTouching

0x008c7780 · 230 bytes · __thiscall

_ZNK8CInferno10IsTouchingEPK8CNavArea

Decompiled

undefined (2 params)

/* CInferno::IsTouching(CNavArea const*) const */

undefined4 __thiscall CInferno::IsTouching(CInferno *this,CNavArea *param_1)

{
  int iVar1;
  int iVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  float local_28;
  float local_24;
  float local_20;
  
  if (param_1 != (CNavArea *)0x0) {
    fVar3 = *(float *)(this + 0xb48) + *(float *)(this + 0xb48);
    if (*(int *)(this + 0xa44) == 1) {
      fVar3 = fVar3 + fVar3;
    }
    if (0 < *(int *)(this + 0xa40)) {
      iVar2 = 0;
      do {
        CNavArea::GetClosestPointOnArea
                  (param_1,(Vector *)(*(int *)(this + iVar2 * 4 + 0xa48) + 0xc),(Vector *)&local_28)
        ;
        iVar1 = *(int *)(this + iVar2 * 4 + 0xa48);
        fVar4 = local_28 - *(float *)(iVar1 + 0xc);
        local_20 = *(float *)(iVar1 + 0x54) + local_20;
        fVar5 = local_24 - *(float *)(iVar1 + 0x10);
        fVar6 = local_20 - *(float *)(iVar1 + 0x14);
        if (fVar4 * fVar4 + fVar5 * fVar5 + fVar6 * fVar6 < fVar3 * fVar3) {
          return 1;
        }
        iVar2 = iVar2 + 1;
      } while (iVar2 < *(int *)(this + 0xa40));
    }
  }
  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)