L L4D2node

CTerrorPlayer::QueuePummelVictim

0x009afcb0 · 280 bytes · __thiscall

_ZN13CTerrorPlayer17QueuePummelVictimEPS_f

Decompiled

undefined (3 params)

/* CTerrorPlayer::QueuePummelVictim(CTerrorPlayer*, float) */

void __thiscall
CTerrorPlayer::QueuePummelVictim(CTerrorPlayer *this,CTerrorPlayer *param_1,float param_2)

{
  uint uVar1;
  CBaseEdict *this_00;
  undefined *puVar2;
  int iVar3;
  undefined4 *puVar4;
  int iVar5;
  float fVar6;
  uint local_20 [4];
  
  CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_20,param_1);
  if (((local_20[0] == 0xffffffff) ||
      (puVar2 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar2 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar2 + 8) != local_20[0] >> 0xc)) {
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(puVar2 + 4);
  }
  uVar1 = *(uint *)(this + 0x3e4c);
  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 (iVar5 != iVar3) {
    if (this[0x6c] == (CTerrorPlayer)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
    }
    *(uint *)(this + 0x3e4c) = local_20[0];
  }
  if (param_1 != (CTerrorPlayer *)0x0) {
    puVar4 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
    *(undefined4 *)(param_1 + 0x3e54) = *puVar4;
    CBaseEntity::AddFlag((CBaseEntity *)this,0x20);
  }
  fVar6 = -1.0;
  if (param_2 != -1.0) {
    fVar6 = param_2 + *(float *)(gpGlobals + 0xc);
  }
  *(float *)(this + 0x3e50) = fVar6;
  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)