L L4D2node

CLeap::OnTouch

0x004d86e0 · 307 bytes · __thiscall

_ZN5CLeap7OnTouchEP11CBaseEntity

Decompiled

undefined (2 params)

/* CLeap::OnTouch(CBaseEntity*) */

void __thiscall CLeap::OnTouch(CLeap *this,CBaseEntity *param_1)

{
  uint uVar1;
  CBaseEntity *this_00;
  byte bVar2;
  char cVar3;
  int *piVar4;
  undefined *puVar5;
  
  uVar1 = *(uint *)(this + 0x44c);
  if ((((uVar1 != 0xffffffff) &&
       (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
     (this_00 = *(CBaseEntity **)(puVar5 + 4), this_00 != (CBaseEntity *)0x0)) {
    uVar1 = *(uint *)(this_00 + 0x3edc);
    if (((uVar1 != 0xffffffff) &&
        (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
       ((*(uint *)(puVar5 + 8) == uVar1 >> 0xc && (*(int *)(puVar5 + 4) != 0)))) {
      return;
    }
    piVar4 = (int *)CBaseEntity::GetGroundEntity(this_00);
    bVar2 = 0;
    if (piVar4 != (int *)0x0) {
      bVar2 = (**(code **)(*piVar4 + 0x16c))(piVar4);
      bVar2 = bVar2 ^ 1;
    }
    if ((((param_1 != (CBaseEntity *)0x0) &&
         (cVar3 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar3 != '\0')) &&
        ((bVar2 == 0 &&
         ((((uVar1 = *(uint *)(this_00 + 0x3edc), uVar1 == 0xffffffff ||
            (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
           (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar5 + 4) == 0)))))) &&
       ((cVar3 = CBaseAbility::IsAbilityReadyToFire((CBaseAbility *)this), cVar3 != '\0' &&
        (cVar3 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar3 != '\0')))) {
      CTerrorPlayer::OnLeptOnSurvivor((CTerrorPlayer *)this_00,(CTerrorPlayer *)param_1);
      return;
    }
  }
  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)