L L4D2node

CLunge::OnTouch

0x004d95f0 · 285 bytes · __thiscall

_ZN6CLunge7OnTouchEP11CBaseEntity

Decompiled

undefined (2 params)

/* CLunge::OnTouch(CBaseEntity*) */

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

{
  uint uVar1;
  char cVar2;
  int iVar3;
  undefined *puVar4;
  longdouble lVar5;
  
  uVar1 = *(uint *)(this + 0x44c);
  if ((((uVar1 != 0xffffffff) &&
       (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
     (*(CBaseEntity **)(puVar4 + 4) != (CBaseEntity *)0x0)) {
    if (((*(int *)(param_1 + 0x30) == 0) ||
        (*(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 == 0)) &&
       (iVar3 = CBaseEntity::GetGroundEntity(*(CBaseEntity **)(puVar4 + 4)), iVar3 == 0)) {
      if (this[0x48c] != (CLunge)0x0) {
        return;
      }
      lVar5 = (longdouble)CountdownTimer::Now();
      if ((float)lVar5 + 0.5 != *(float *)(this + 0x468)) {
        (**(code **)(*(int *)(this + 0x460) + 4))(this + 0x460,this + 0x468);
        *(float *)(this + 0x468) = (float)lVar5 + 0.5;
      }
      if (*(float *)(this + 0x464) == 0.5) {
        return;
      }
      (**(code **)(*(int *)(this + 0x460) + 4))(this + 0x460,this + 0x464);
      *(undefined4 *)(this + 0x464) = 0x3f000000;
      return;
    }
    cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
    if (cVar2 != '\0') {
      this[0x48c] = (CLunge)0x1;
      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)