L L4D2node

CAI_BehaviorBase::GetFailSchedule

0x005a61d0 · 138 bytes · __thiscall

_ZN16CAI_BehaviorBase15GetFailScheduleEP24AIChannelScheduleState_t

Decompiled

undefined (2 params)

/* CAI_BehaviorBase::GetFailSchedule(AIChannelScheduleState_t*) */

void __thiscall
CAI_BehaviorBase::GetFailSchedule(CAI_BehaviorBase *this,AIChannelScheduleState_t *param_1)

{
  undefined4 *puVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  
  if (*(int **)(param_1 + 4) == (int *)0x0) {
    uVar4 = 0;
    uVar5 = 0;
  }
  else {
    iVar2 = **(int **)(param_1 + 4);
    iVar3 = (**(code **)(*(int *)this + 0x180))(this);
    uVar4 = CAI_LocalIdSpace::GlobalToLocal((CAI_LocalIdSpace *)(iVar3 + 4),iVar2);
    iVar2 = *(int *)(param_1 + 4);
    uVar5 = 0;
    iVar3 = *(int *)(param_1 + 0x10);
    if ((((iVar2 != 0) && (-1 < iVar3)) && (iVar3 < *(int *)(iVar2 + 8))) &&
       (puVar1 = (undefined4 *)(*(int *)(iVar2 + 4) + iVar3 * 8), puVar1 != (undefined4 *)0x0)) {
      uVar5 = *puVar1;
    }
  }
  (**(code **)(*(int *)this + 0x1c0))(this,uVar4,uVar5,*(undefined4 *)(param_1 + 0x20));
                    /* WARNING: Could not recover jumptable at 0x005a6252. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (**(code **)(*(int *)this + 0x1d0))();
  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)