L L4D2node

CAI_BehaviorBase::IsScheduleValid

0x005a62c0 · 337 bytes · __thiscall

_ZN16CAI_BehaviorBase15IsScheduleValidEP24AIChannelScheduleState_t

Decompiled

undefined (2 params)

/* CAI_BehaviorBase::IsScheduleValid(AIChannelScheduleState_t*) */

undefined4 __thiscall
CAI_BehaviorBase::IsScheduleValid(CAI_BehaviorBase *this,AIChannelScheduleState_t *param_1)

{
  int *piVar1;
  uint uVar2;
  int iVar3;
  uint local_3c [11];
  
  iVar3 = *(int *)(param_1 + 4);
  if ((((iVar3 != 0) && (*(int *)(iVar3 + 8) != 0)) &&
      (*(int *)(iVar3 + 8) != *(int *)(param_1 + 0x10))) && (*(int *)(param_1 + 0x20) == 0)) {
    piVar1 = *(int **)(this + 4);
    local_3c[1] = *(uint *)(iVar3 + 0x10) & piVar1[0x6a9];
    local_3c[2] = *(uint *)(iVar3 + 0x14) & piVar1[0x6aa];
    local_3c[3] = *(uint *)(iVar3 + 0x18) & piVar1[0x6ab];
    uVar2 = piVar1[0x6a8] & *(uint *)(iVar3 + 0xc);
    local_3c[0] = uVar2;
    local_3c[4] = *(uint *)(iVar3 + 0x1c) & piVar1[0x6ac];
    local_3c[5] = *(uint *)(iVar3 + 0x20) & piVar1[0x6ad];
    local_3c[6] = *(uint *)(iVar3 + 0x24) & piVar1[0x6ae];
    local_3c[7] = *(uint *)(iVar3 + 0x28) & piVar1[0x6af];
    if (((((uVar2 == 0) && (local_3c[1] == 0)) &&
         ((local_3c[2] == 0 && ((local_3c[3] == 0 && (local_3c[4] == 0)))))) && (local_3c[5] == 0))
       && ((local_3c[6] == 0 && (local_3c[7] == 0)))) {
      return 1;
    }
    if (*(int *)(developer._28_4_ + 0x30) != 0) {
      iVar3 = 0;
      while ((uVar2 & 1 << ((byte)iVar3 & 0x1f)) == 0) {
        iVar3 = iVar3 + 1;
        if (iVar3 == 0x100) {
          return 0;
        }
        uVar2 = local_3c[iVar3 >> 5];
      }
      (**(code **)(*piVar1 + 0x658))(piVar1,iVar3 + 1000000000);
    }
  }
  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)