L L4D2node

SurvivorBehavior::IsHindrance

0x00927ec0 · 424 bytes · __thiscall

_ZNK16SurvivorBehavior11IsHindranceEPK8INextBotP11CBaseEntity

Decompiled

undefined (3 params)

/* SurvivorBehavior::IsHindrance(INextBot const*, CBaseEntity*) const */

undefined4 __thiscall
SurvivorBehavior::IsHindrance(SurvivorBehavior *this,INextBot *param_1,CBaseEntity *param_2)

{
  SurvivorBot *this_00;
  uint uVar1;
  char cVar2;
  int iVar3;
  SurvivorTeamSituation *this_01;
  CBaseCombatCharacter *pCVar4;
  int *piVar5;
  undefined *puVar6;
  
  if (param_2 == (CBaseEntity *)&DAT_ffffffff) {
    return 1;
  }
  cVar2 = CTerrorGameRules::IsVersusMode();
  if ((cVar2 == '\0') &&
     (cVar2 = (**(code **)(*(int *)param_1 + 0x11c))
                        (param_1,param_2,*(undefined4 *)(SurvivorBotHindranceRange._28_4_ + 0x2c)),
     cVar2 == '\0')) {
    iVar3 = CBaseEntity::GetTeamNumber(param_2);
    cVar2 = IsASurvivorTeam(iVar3);
    if (cVar2 == '\0') {
      this_00 = (SurvivorBot *)(param_1 + -0x4028);
      cVar2 = SurvivorBot::IsNearCheckpoint(this_00);
      if (cVar2 == '\0') {
        this_01 = (SurvivorTeamSituation *)SurvivorBot::GetTeamSituation(this_00);
        uVar1 = *(uint *)(this_01 + 0x54);
        if ((((((uVar1 == 0xffffffff) ||
               (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc))
              || (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) ||
             ((*(CTerrorPlayer **)(puVar6 + 4) == (CTerrorPlayer *)0x0 ||
              (cVar2 = SurvivorBot::IsBehind(this_00,*(CTerrorPlayer **)(puVar6 + 4)), cVar2 == '\0'
              )))) || (cVar2 = SurvivorTeamSituation::IsAnyTeammateNearCheckpoint(this_01),
                      cVar2 == '\0')) &&
           ((cVar2 = CDirector::IsFinale(TheDirector), cVar2 == '\0' ||
            (cVar2 = CDirector::IsFinaleVehicleReady(TheDirector), cVar2 == '\0')))) {
          iVar3 = CBaseEntity::GetTeamNumber(param_2);
          if (iVar3 != 3) {
            return 2;
          }
          pCVar4 = (CBaseCombatCharacter *)(**(code **)(*(int *)param_2 + 0x144))(param_2);
          cVar2 = CBaseCombatCharacter::IsA(pCVar4,8);
          if (cVar2 == '\0') {
            pCVar4 = (CBaseCombatCharacter *)(**(code **)(*(int *)param_2 + 0x144))(param_2);
            cVar2 = CBaseCombatCharacter::IsA(pCVar4,7);
            if (cVar2 == '\0') {
              piVar5 = (int *)(**(code **)(*(int *)param_1 + 0xcc))(param_1);
              cVar2 = (**(code **)(*piVar5 + 0xd0))(piVar5,param_2,1,0);
              if (cVar2 != '\0') {
                return 1;
              }
            }
          }
          return 2;
        }
      }
    }
  }
  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)