L L4D2node

Action<Tank>::InvokeOnSuspend

0x00af0690 · 483 bytes · __thiscall

_ZN6ActionI4TankE15InvokeOnSuspendEPS0_P8BehaviorIS0_EPS1_

Decompiled

undefined (4 params)

/* Action<Tank>::InvokeOnSuspend(Tank*, Behavior<Tank>*, Action<Tank>*) */

Action<Tank> * __thiscall
Action<Tank>::InvokeOnSuspend(Action<Tank> *this,Tank *param_1,Behavior *param_2,Action *param_3)

{
  INextBot *this_00;
  char cVar1;
  undefined4 uVar2;
  Action<Tank> *pAVar3;
  int in_GS_OFFSET;
  Tank *pTVar4;
  Tank *pTVar5;
  int local_30 [3];
  undefined1 local_24;
  undefined1 local_23;
  undefined1 local_22;
  undefined1 local_21;
  int local_20;
  
  this_00 = (INextBot *)(param_1 + 0x4028);
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  cVar1 = INextBot::IsDebugging(this_00,1);
  if ((cVar1 != '\0') || (*(int *)(NextBotDebugHistory._28_4_ + 0x30) != 0)) {
    uVar2 = (**(code **)(*(int *)param_1 + 0x9a4))(param_1);
    local_24 = 0xff;
    local_23 = 0xff;
    local_22 = 0x96;
    local_21 = 0xff;
    INextBot::DebugConColorMsg
              (this_00,1,&local_24,"%3.2f: %s:%s: ",(double)*(float *)(gpGlobals + 0xc),uVar2,
               param_2 + 0x11);
    local_24 = 0xff;
    local_23 = 0;
    local_22 = 0xff;
    local_21 = 0xff;
    INextBot::DebugConColorMsg(this_00,1,&local_24," SUSPENDING ");
    uVar2 = (**(code **)(*(int *)this + 0xa4))(this);
    local_24 = 0xff;
    local_23 = 0xff;
    local_22 = 0xff;
    local_21 = 0xff;
    INextBot::DebugConColorMsg(this_00,1,&local_24,uVar2);
    local_24 = 0xff;
    local_23 = 0xff;
    local_22 = 0xff;
    local_21 = 0xff;
    INextBot::DebugConColorMsg(this_00,1,&local_24,&DAT_00cff71e);
  }
  pTVar4 = (Tank *)local_30;
  this[0x31] = (Action<Tank>)0x1;
  pAVar3 = this;
  pTVar5 = param_1;
  (**(code **)(*(int *)this + 0xbc))();
  if (local_30[0] == 3) {
    if (this[0x30] != (Action<Tank>)0x0) {
      InvokeOnEnd((Action<Tank> *)0x0,pTVar4,(Behavior *)pAVar3,(Action *)pTVar5);
    }
    pAVar3 = *(Action<Tank> **)(this + 0x14);
    (**(code **)(*(int *)this + 4))(this);
  }
  else {
    pAVar3 = this;
    if (*(Action<Tank> **)(this + 0x10) != (Action<Tank> *)0x0) {
      uVar2 = InvokeOnSuspend(*(Action<Tank> **)(this + 0x10),param_1,param_2,param_3);
      *(undefined4 *)(this + 0x10) = uVar2;
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pAVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)