L L4D2node

SurvivorApproachMinigun::OnStartUse

0x00926140 · 278 bytes · __thiscall

_ZN23SurvivorApproachMinigun10OnStartUseEP11SurvivorBot

Decompiled

undefined (2 params)

/* SurvivorApproachMinigun::OnStartUse(SurvivorBot*) */

void __thiscall
SurvivorApproachMinigun::OnStartUse(SurvivorApproachMinigun *this,SurvivorBot *param_1)

{
  int *piVar1;
  SurvivorLegsWait *this_00;
  int iVar2;
  undefined4 *puVar3;
  longdouble lVar4;
  
  lVar4 = (longdouble)CountdownTimer::Now();
  if ((float)lVar4 + 1.0 != *(float *)(this + 0x40)) {
    (**(code **)(*(int *)(this + 0x38) + 4))(this + 0x38,this + 0x40);
    *(float *)(this + 0x40) = (float)lVar4 + 1.0;
  }
  if (*(float *)(this + 0x3c) != 1.0) {
    (**(code **)(*(int *)(this + 0x38) + 4))(this + 0x38,this + 0x3c);
    *(undefined4 *)(this + 0x3c) = 0x3f800000;
  }
  this_00 = ::operator_new(0x44);
                    /* try { // try from 009261af to 009261b3 has its CatchHandler @ 0092627d */
  SurvivorLegsWait::SurvivorLegsWait(this_00,0.0);
  iVar2 = (**(code **)(*(int *)param_1 + 0x9a8))(param_1);
  piVar1 = *(int **)(iVar2 + 0x20 + *(int *)(iVar2 + 0x60) * 4);
  puVar3 = ::operator_new(0x38);
  *puVar3 = &PTR__Behavior_00d00308;
  puVar3[1] = &PTR__Behavior_00d003d0;
                    /* try { // try from 009261f9 to 009261fd has its CatchHandler @ 0092625e */
  CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar3 + 3),"%s",&DAT_00d539c2);
  puVar3[2] = this_00;
  *(undefined4 **)(iVar2 + 0x20 + *(int *)(iVar2 + 0x60) * 4) = puVar3;
  if (piVar1 != (int *)0x0) {
                    /* WARNING: Could not recover jumptable at 0x0092621e. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(*piVar1 + 4))();
    return;
  }
  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)