L L4D2node

SurvivorBot::IsAbleToCoverFriend

0x00938bf0 · 224 bytes · __thiscall

_ZNK11SurvivorBot19IsAbleToCoverFriendEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* SurvivorBot::IsAbleToCoverFriend(CTerrorPlayer*) const */

undefined4 __thiscall SurvivorBot::IsAbleToCoverFriend(SurvivorBot *this,CTerrorPlayer *param_1)

{
  uint uVar1;
  char cVar2;
  int iVar3;
  uint *puVar4;
  undefined4 uVar5;
  int iVar6;
  undefined *puVar7;
  
  cVar2 = (**(code **)(*(int *)(this + 0x4028) + 0x114))
                    (this + 0x4028,param_1,*(undefined4 *)(SurvivorBotNeighborRange._28_4_ + 0x2c));
  if (cVar2 != '\0') {
    cVar2 = CTerrorPlayer::IsInCombat(param_1,false);
    if (cVar2 == '\0') {
LAB_00938cbe:
      uVar5 = CBaseCombatCharacter::IsAbleToSee((CBaseCombatCharacter *)this,param_1,1);
      return uVar5;
    }
    iVar3 = (**(code **)(*(int *)this + 0x9a8))(this);
    if (0 < *(int *)(iVar3 + 0x70)) {
      iVar6 = 0;
      puVar4 = *(uint **)(iVar3 + 100);
      do {
        if (((((char)puVar4[10] != '\0') && (uVar1 = *puVar4, uVar1 != 0xffffffff)) &&
            (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
           ((*(uint *)(puVar7 + 8) == uVar1 >> 0xc && (*(int *)(puVar7 + 4) != 0))))
        goto LAB_00938cbe;
        iVar6 = iVar6 + 1;
        puVar4 = puVar4 + 0xb;
      } while (iVar6 != *(int *)(iVar3 + 0x70));
    }
  }
  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)