L L4D2node

CTongue::OnTouch

0x00843060 · 243 bytes · __thiscall

_ZN7CTongue7OnTouchEP11CBaseEntity

Decompiled

undefined (2 params)

/* CTongue::OnTouch(CBaseEntity*) */

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

{
  uint uVar1;
  int *piVar2;
  CBaseEdict *this_00;
  CBaseEntity *pCVar3;
  int iVar4;
  undefined *puVar5;
  
  uVar1 = *(uint *)(this + 0x44c);
  if ((((uVar1 != 0xffffffff) &&
       (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
     (piVar2 = *(int **)(puVar5 + 4), piVar2 != (int *)0x0)) {
    uVar1 = piVar2[0xcf0];
    if (uVar1 == 0xffffffff) {
      pCVar3 = (CBaseEntity *)0x0;
    }
    else {
      puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
      if (puVar5 == (undefined *)0xfffffffc) {
        return;
      }
      if (*(uint *)(puVar5 + 8) != uVar1 >> 0xc) {
        return;
      }
      pCVar3 = *(CBaseEntity **)(puVar5 + 4);
    }
    if ((param_1 == pCVar3) && (param_1 != (CBaseEntity *)0x0)) {
      if (param_1[0x33dc] == (CBaseEntity)0x0) {
        (**(code **)(*piVar2 + 0x7fc))(piVar2,0x5a,0);
      }
      if (param_1[0x33dd] == (CBaseEntity)0x0) {
        if (param_1[0x6c] == (CBaseEntity)0x0) {
          this_00 = *(CBaseEdict **)(param_1 + 0x30);
          if (this_00 != (CBaseEdict *)0x0) {
            *(uint *)this_00 = *(uint *)this_00 | 0x101;
            iVar4 = CBaseEdict::GetChangeAccessor(this_00);
            *(undefined2 *)(iVar4 + 2) = 0;
          }
        }
        else {
          param_1[0x70] = (CBaseEntity)((byte)param_1[0x70] | 1);
        }
        param_1[0x33dd] = (CBaseEntity)0x1;
      }
      CTerrorPlayer::OnStartHangingFromTongue((CTerrorPlayer *)param_1,2);
      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)