L L4D2node

CTerrorPlayer::OnHitSurvivorWithClaw

0x009b27c0 · 240 bytes · __thiscall

_ZN13CTerrorPlayer21OnHitSurvivorWithClawE21SurvivorCharacterType

Decompiled

undefined (2 params)

/* CTerrorPlayer::OnHitSurvivorWithClaw(SurvivorCharacterType) */

void __thiscall CTerrorPlayer::OnHitSurvivorWithClaw(CTerrorPlayer *param_1,uint param_2)

{
  CBaseEdict *this;
  uint uVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined *puVar5;
  
  if (param_2 < 4) {
    *(int *)(param_1 + param_2 * 0x34 + 0x2fa0) = *(int *)(param_1 + param_2 * 0x34 + 0x2fa0) + 1;
    *(int *)(param_1 + 0x3070) = *(int *)(param_1 + 0x3070) + 1;
    iVar2 = GetPlayerByCharacter(param_2);
    iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
    if (iVar3 == 3) {
      iVar3 = (**(code **)(*(int *)param_1 + 0x544))(param_1);
      if (iVar3 == 8) {
        iVar3 = *(int *)(param_1 + 0x39b8);
        if (param_1[0x6c] == (CTerrorPlayer)0x0) {
          this = *(CBaseEdict **)(param_1 + 0x30);
          if (this != (CBaseEdict *)0x0) {
            *(uint *)this = *(uint *)this | 0x101;
            iVar4 = CBaseEdict::GetChangeAccessor(this);
            *(undefined2 *)(iVar4 + 2) = 0;
          }
        }
        else {
          param_1[0x70] = (CTerrorPlayer)((byte)param_1[0x70] | 1);
        }
        *(int *)(param_1 + 0x39b8) = iVar3 + 1;
        uVar1 = *(uint *)(iVar2 + 0x3ee0);
        if ((((uVar1 != 0xffffffff) &&
             (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc))
            && (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
           (*(CTerrorPlayer **)(puVar5 + 4) != (CTerrorPlayer *)0x0)) {
          OnRideEnded(*(CTerrorPlayer **)(puVar5 + 4),(CTerrorPlayer *)0x0);
          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)