L L4D2node

WitchExecAction::Update

0x00a3f690 · 204 bytes · __thiscall

_ZN15WitchExecAction6UpdateEP8Infectedf

Decompiled

undefined (3 params)

/* WitchExecAction::Update(Infected*, float) */

WitchExecAction * __thiscall
WitchExecAction::Update(WitchExecAction *this,Infected *param_1,float param_2)

{
  char cVar1;
  longdouble lVar2;
  float fVar3;
  CTakeDamageInfo local_7c [108];
  
  if ((param_2 != 0.0) && ((*(byte *)((int)param_2 + 0x153) & 8) != 0)) {
    cVar1 = (**(code **)(*(int *)param_2 + 300))(param_2);
    if (cVar1 != '\0') {
      if (*(float *)((int)param_2 + 0x1cc4) <= 0.0) {
        fVar3 = 99999.9;
      }
      else {
        lVar2 = (longdouble)IntervalTimer::Now();
        fVar3 = (float)lVar2 - *(float *)((int)param_2 + 0x1cc4);
      }
      if (*(float *)(WitchBurnTime._28_4_ + 0x2c) <= fVar3 &&
          fVar3 != *(float *)(WitchBurnTime._28_4_ + 0x2c)) {
        CTakeDamageInfo::CTakeDamageInfo
                  (local_7c,(CBaseEntity *)param_2,(CBaseEntity *)param_2,9999.9,8,0);
        CBaseEntity::TakeDamage((CBaseEntity *)param_2,local_7c);
      }
    }
  }
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  return this;
}

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)