L L4D2node

CFlexCycler::OnTakeDamage

0x00623b30 · 143 bytes · __cdecl

_ZN11CFlexCycler12OnTakeDamageERK15CTakeDamageInfo

Decompiled

undefined (1 param)

/* CFlexCycler::OnTakeDamage(CTakeDamageInfo const&) */

undefined4 CFlexCycler::OnTakeDamage(CTakeDamageInfo *param_1)

{
  CBaseEdict *this;
  char cVar1;
  int iVar2;
  
  iVar2 = *(int *)(param_1 + 0x494) + 1;
  cVar1 = CBaseAnimating::IsValidSequence((CBaseAnimating *)param_1,iVar2);
  if (cVar1 == '\0') {
    iVar2 = 0;
  }
  CBaseAnimating::ResetSequence((CBaseAnimating *)param_1,iVar2);
  if (*(float *)(param_1 + 0x490) == 0.0) {
    return 0;
  }
  if (param_1[0x6c] == (CTakeDamageInfo)0x0) {
    this = *(CBaseEdict **)(param_1 + 0x30);
    if (this != (CBaseEdict *)0x0) {
      *(uint *)this = *(uint *)this | 0x101;
      iVar2 = CBaseEdict::GetChangeAccessor(this);
      *(undefined2 *)(iVar2 + 2) = 0;
    }
    *(undefined4 *)(param_1 + 0x490) = 0;
  }
  else {
    param_1[0x70] = (CTakeDamageInfo)((byte)param_1[0x70] | 1);
    *(undefined4 *)(param_1 + 0x490) = 0;
  }
  return 0;
}

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)