L L4D2node

WitchIdle::OnStart

0x00a40210 · 512 bytes · __thiscall

_ZN9WitchIdle7OnStartEP8InfectedP6ActionIS0_E

Decompiled

undefined (3 params)

/* WitchIdle::OnStart(Infected*, Action<Infected>*) */

WitchIdle * __thiscall WitchIdle::OnStart(WitchIdle *this,Infected *param_1,Action *param_2)

{
  char cVar1;
  WitchAngry *this_00;
  int *piVar2;
  undefined4 uVar3;
  longdouble lVar4;
  
  if (0.0 < *(float *)(param_2 + 0x1d94)) {
    this_00 = ::operator_new(0x50);
                    /* try { // try from 00a40244 to 00a40248 has its CatchHandler @ 00a4041d */
    WitchAngry::WitchAngry(this_00,0.0);
LAB_00a40249:
    *(undefined4 *)this = 1;
    *(WitchAngry **)(this + 4) = this_00;
    *(undefined4 *)(this + 8) = 0;
    return this;
  }
  Witch::SetHarasser((Witch *)param_2,(CBaseEntity *)0x0);
  piVar2 = (int *)(**(code **)(*(int *)param_2 + 0x594))(param_2);
  if (piVar2 != (int *)0x0) {
    (**(code **)(*piVar2 + 0x10c))(piVar2,0);
    cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x2ac,0);
    if (cVar1 == '\0') {
      this_00 = ::operator_new(0x50);
                    /* try { // try from 00a403b1 to 00a403b5 has its CatchHandler @ 00a4042f */
      WitchAngry::WitchAngry(this_00,0.0);
      goto LAB_00a40249;
    }
    (**(code **)(*piVar2 + 0xec))(piVar2,2);
  }
  lVar4 = (longdouble)CountdownTimer::Now();
  if ((float)lVar4 + 2.0 != *(float *)(param_1 + 0x3c)) {
    (**(code **)(*(int *)(param_1 + 0x34) + 4))(param_1 + 0x34,param_1 + 0x3c);
    *(float *)(param_1 + 0x3c) = (float)lVar4 + 2.0;
  }
  if (*(float *)(param_1 + 0x38) != 2.0) {
    (**(code **)(*(int *)(param_1 + 0x34) + 4))(param_1 + 0x34,param_1 + 0x38);
    *(undefined4 *)(param_1 + 0x38) = 0x40000000;
  }
  uVar3 = CBaseFlex::FindFlexController((CBaseFlex *)param_2,"presser");
  CBaseFlex::SetFlexWeight((CBaseFlex *)param_2,uVar3,0x3f800000);
  if (*(float *)(param_1 + 0x48) != -1.0) {
    (**(code **)(*(int *)(param_1 + 0x40) + 4))(param_1 + 0x40,param_1 + 0x48);
    *(undefined4 *)(param_1 + 0x48) = 0xbf800000;
  }
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  *(undefined4 *)(param_1 + 0x4c) = 0xffffffff;
  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)