L L4D2node

CTerrorPlayer::ResetActionProgress

0x009a8b80 · 341 bytes · __thiscall

_ZN13CTerrorPlayer19ResetActionProgressEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::ResetActionProgress() */

void __thiscall CTerrorPlayer::ResetActionProgress(CTerrorPlayer *this)

{
  uint uVar1;
  char cVar2;
  undefined4 uVar3;
  int iVar4;
  CBaseBackpackItem *this_00;
  undefined *puVar5;
  CCSPlayer *this_01;
  CCSPlayer *pCVar6;
  CCSPlayer *this_02;
  
  if (*(float *)(action_progress_reset_interval._28_4_ + 0x2c) + *(float *)(this + 0x3f58) <=
      *(float *)(gpGlobals + 0xc)) {
    uVar1 = *(uint *)(this + 0x2b40);
    *(float *)(this + 0x3f58) = *(float *)(gpGlobals + 0xc);
    if (((uVar1 == 0xffffffff) ||
        (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) {
      this_02 = (CCSPlayer *)0x0;
    }
    else {
      this_02 = *(CCSPlayer **)(puVar5 + 4);
      if (this_02 != (CCSPlayer *)0x0) {
        CCSPlayer::ResetProgressBar(this_02);
        iVar4 = CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this);
        if ((iVar4 != 0) &&
           (this_00 = (CBaseBackpackItem *)
                      __dynamic_cast(iVar4,&CBaseCombatWeapon::typeinfo,&CBaseBackpackItem::typeinfo
                                     ,0), this_00 != (CBaseBackpackItem *)0x0)) {
          CBaseBackpackItem::ResetActionProgress(this_00);
        }
      }
    }
    uVar1 = *(uint *)(this + 0x2b3c);
    pCVar6 = (CCSPlayer *)0x0;
    if (((uVar1 != 0xffffffff) &&
        (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
       ((*(uint *)(puVar5 + 8) == uVar1 >> 0xc &&
        (((pCVar6 = *(CCSPlayer **)(puVar5 + 4), pCVar6 != (CCSPlayer *)0x0 &&
          (cVar2 = (**(code **)(*(int *)pCVar6 + 0x16c))(pCVar6), cVar2 != '\0')) &&
         (pCVar6 != this_02)))))) {
      cVar2 = (**(code **)(*(int *)pCVar6 + 0x16c))(pCVar6);
      this_01 = (CCSPlayer *)0x0;
      if (cVar2 != '\0') {
        this_01 = pCVar6;
      }
      CCSPlayer::ResetProgressBar(this_01);
    }
    uVar3 = GetCurrentUseAction((CTerrorPlayer *)this_02);
    DoUseActionAnimationEvents(this,uVar3,pCVar6);
  }
  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)