L L4D2node

CAI_BehaviorBase::SetSchedule

0x005a6480 · 170 bytes · __thiscall

_ZN16CAI_BehaviorBase11SetScheduleEii

Decompiled

undefined (3 params)

/* CAI_BehaviorBase::SetSchedule(int, int) */

undefined4 __thiscall CAI_BehaviorBase::SetSchedule(CAI_BehaviorBase *this,int param_1,int param_2)

{
  int iVar1;
  undefined4 uVar2;
  CAI_Schedule *pCVar3;
  int iVar4;
  
  if ((-1 < param_1) && (param_1 < *(int *)(this + 0x18))) {
    uVar2 = (**(code **)(*(int *)this + 0x1a8))(this,param_1,param_2);
    pCVar3 = (CAI_Schedule *)(**(code **)(*(int *)this + 0x1d0))(this,uVar2);
    if (pCVar3 != (CAI_Schedule *)0x0) {
      iVar1 = *(int *)(this + 0xc) + param_1 * 0x28;
      if (param_2 < 1000000000) {
        iVar4 = (**(code **)(*(int *)this + 0x180))(this);
        uVar2 = CAI_LocalIdSpace::LocalToGlobal((CAI_LocalIdSpace *)(iVar4 + 4),param_2);
        *(undefined4 *)(iVar1 + 8) = uVar2;
      }
      else {
        *(int *)(iVar1 + 8) = param_2;
      }
      SetSchedule(this,param_1,pCVar3);
      return 1;
    }
  }
  return 0;
}

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)