L L4D2node

CTerrorPlayer::ItemPostFrame

0x004f6990 · 315 bytes · __thiscall

_ZN13CTerrorPlayer13ItemPostFrameEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::ItemPostFrame() */

void __thiscall CTerrorPlayer::ItemPostFrame(CTerrorPlayer *this)

{
  uint uVar1;
  int *piVar2;
  char cVar3;
  int iVar4;
  uint uVar5;
  undefined *puVar6;
  char *local_24;
  char *local_20;
  
  uVar1 = *(uint *)(this + 0x30bc);
  if ((((uVar1 != 0xffffffff) &&
       (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) &&
     (piVar2 = *(int **)(puVar6 + 4), piVar2 != (int *)0x0)) {
    uVar1 = *(uint *)(this + 0x1cb4);
    uVar5 = (**(code **)(*piVar2 + 0x348))(piVar2);
    if ((uVar5 & uVar1) != 0) {
      (**(code **)(*piVar2 + 0x34c))(piVar2);
    }
    uVar1 = *(uint *)(this + 0x1cb8);
    uVar5 = (**(code **)(*piVar2 + 0x348))(piVar2);
    if ((uVar5 & uVar1) != 0) {
      (**(code **)(*piVar2 + 0x350))(piVar2);
    }
    (**(code **)(*piVar2 + 0x334))(piVar2);
  }
  UpdateStillTimer(this);
  local_24 = "Fade";
  local_20 = "Damage";
  CBasePlayer::StartUserMessageThrottling((CBasePlayer *)this,&local_24,2);
                    /* try { // try from 004f69ff to 004f6a54 has its CatchHandler @ 004f6add */
  cVar3 = (**(code **)(*(int *)this + 0x170))(this);
  if (cVar3 != '\0') {
    if (*(int *)(this + 0x30) == 0) {
      iVar4 = 0;
    }
    else {
      iVar4 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
    if ((iVar4 + *(int *)(gpGlobals + 0x18)) % (int)(0.25 / *(float *)(gpGlobals + 0x1c) + 0.5) == 0
       ) {
      TraceForBuildableButtonUseEnt(this);
    }
  }
  CBasePlayer::ItemPostFrame((CBasePlayer *)this);
  CBasePlayer::FinishUserMessageThrottling();
  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)