L L4D2node

CAI_BehaviorBase::GetNewSchedule

0x005a6170 · 86 bytes · __thiscall

_ZN16CAI_BehaviorBase14GetNewScheduleEi

Decompiled

undefined (2 params)

/* CAI_BehaviorBase::GetNewSchedule(int) */

undefined4 * __thiscall CAI_BehaviorBase::GetNewSchedule(CAI_BehaviorBase *this,int param_1)

{
  undefined4 uVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  
  puVar3 = (undefined4 *)0x0;
  if ((-1 < param_1) && (param_1 < *(int *)(this + 0x18))) {
    uVar1 = (**(code **)(*(int *)this + 0x1a0))(this,param_1);
    puVar2 = (undefined4 *)(**(code **)(*(int *)this + 0x1d0))(this,uVar1);
    if (puVar2 != (undefined4 *)0x0) {
      *(undefined4 *)(*(int *)(this + 0xc) + param_1 * 0x28 + 8) = *puVar2;
      puVar3 = puVar2;
    }
  }
  return puVar3;
}

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)