L L4D2node

CTerrorPlayer::OnGrabbingWithTongue

0x00845320 · 239 bytes · __thiscall

_ZN13CTerrorPlayer20OnGrabbingWithTongueEPS_

Decompiled

undefined (2 params)

/* CTerrorPlayer::OnGrabbingWithTongue(CTerrorPlayer*) */

void __thiscall CTerrorPlayer::OnGrabbingWithTongue(CTerrorPlayer *this,CTerrorPlayer *param_1)

{
  uint uVar1;
  CBaseEdict *this_00;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  uint local_10;
  
  CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)&local_10,param_1);
  if (((local_10 == 0xffffffff) ||
      (puVar2 = g_pEntityList + (local_10 & 0xfff) * 0x10, puVar2 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar2 + 8) != local_10 >> 0xc)) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)(puVar2 + 4);
  }
  uVar1 = *(uint *)(this + 0x33c0);
  if (((uVar1 == 0xffffffff) ||
      (puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar2 + 8) != uVar1 >> 0xc)) {
    iVar3 = 0;
  }
  else {
    iVar3 = *(int *)(puVar2 + 4);
  }
  if (iVar4 != iVar3) {
    if (this[0x6c] == (CTerrorPlayer)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
      *(uint *)(this + 0x33c0) = local_10;
    }
    else {
      this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
      *(uint *)(this + 0x33c0) = local_10;
    }
  }
  (**(code **)(*(int *)this + 0x81c))(this);
  CBasePlayer::RumbleEffect((CBasePlayer *)this,'%','\0','\x02');
  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)