L L4D2node

Action<Tank>::InvokeOnStart

0x00af16f0 · 574 bytes · __cdecl

_ZN6ActionI4TankE13InvokeOnStartEPS0_P8BehaviorIS0_EPS1_S6_

Decompiled

undefined (4 params)

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

Tank * Action<Tank>::InvokeOnStart(Tank *param_1,Behavior *param_2,Action *param_3,Action *param_4)

{
  INextBot *this;
  char cVar1;
  int iVar2;
  undefined4 uVar3;
  int in_GS_OFFSET;
  int in_stack_00000014;
  int in_stack_00000018;
  undefined1 local_24;
  undefined1 local_23;
  undefined1 local_22;
  undefined1 local_21;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  this = (INextBot *)(param_3 + 0x4028);
  cVar1 = INextBot::IsDebugging(this,1);
  if ((cVar1 != '\0') || (*(int *)(NextBotDebugHistory._28_4_ + 0x30) != 0)) {
    uVar3 = (**(code **)(*(int *)param_3 + 0x9a4))(param_3);
    local_24 = 0xff;
    local_23 = 0xff;
    local_22 = 0x96;
    local_21 = 0xff;
    INextBot::DebugConColorMsg
              (this,1,&local_24,"%3.2f: %s:%s: ",(double)*(float *)(gpGlobals + 0xc),uVar3,
               param_4 + 0x11);
    local_24 = 0;
    local_23 = 0xff;
    local_22 = 0;
    local_21 = 0xff;
    INextBot::DebugConColorMsg(this,1,&local_24," STARTING ");
    uVar3 = (**(code **)(*(int *)param_2 + 0xa4))(param_2);
    local_24 = 0xff;
    local_23 = 0xff;
    local_22 = 0xff;
    local_21 = 0xff;
    INextBot::DebugConColorMsg(this,1,&local_24,uVar3);
    local_24 = 0xff;
    local_23 = 0xff;
    local_22 = 0xff;
    local_21 = 0xff;
    INextBot::DebugConColorMsg(this,1,&local_24,&DAT_00cff71e);
  }
  param_2[0x30] = (Behavior)0x1;
  *(Action **)(param_2 + 0x1c) = param_3;
  *(Action **)(param_2 + 8) = param_4;
  if (in_stack_00000014 == 0) {
    iVar2 = *(int *)(param_2 + 0xc);
  }
  else {
    iVar2 = *(int *)(in_stack_00000014 + 0xc);
    *(int *)(param_2 + 0xc) = iVar2;
  }
  if (iVar2 != 0) {
    *(Behavior **)(iVar2 + 0x10) = param_2;
  }
  *(int *)(param_2 + 0x14) = in_stack_00000018;
  if (in_stack_00000018 != 0) {
    *(Behavior **)(in_stack_00000018 + 0x18) = param_2;
  }
  *(undefined4 *)(param_2 + 0x18) = 0;
  (**(code **)(*(int *)param_2 + 0xb0))(param_1,param_2,param_3,in_stack_00000014);
  iVar2 = (**(code **)(*(int *)param_2 + 0xc4))(param_2,param_3);
  *(int *)(param_2 + 0x10) = iVar2;
  if (iVar2 != 0) {
    *(Behavior **)(iVar2 + 0xc) = param_2;
    uVar3 = ApplyResult(*(undefined4 *)(param_2 + 0x10),param_3,param_4,1,
                        *(undefined4 *)(param_2 + 0x10),"Starting child Action");
    *(undefined4 *)(param_2 + 0x10) = uVar3;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return param_1;
  }
                    /* 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)