L L4D2node

SurvivorBot::IsEnemy

0x00937c10 · 101 bytes · __thiscall

_ZNK11SurvivorBot7IsEnemyEPK20CBaseCombatCharacter

Decompiled

undefined (2 params)

/* SurvivorBot::IsEnemy(CBaseCombatCharacter const*) const */

undefined4 __thiscall SurvivorBot::IsEnemy(SurvivorBot *this,CBaseCombatCharacter *param_1)

{
  char cVar1;
  int iVar2;
  undefined4 uVar3;
  CBaseEntity *this_00;
  
  if (param_1 == (CBaseCombatCharacter *)0x0) {
    return 0;
  }
  iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
  cVar1 = IsASurvivorTeam(iVar2);
  if (cVar1 != '\0') {
    this_00 = (CBaseEntity *)(**(code **)(*(int *)this + 0x99c))(this);
    iVar2 = CBaseEntity::GetTeamNumber(this_00);
    cVar1 = IsASurvivorTeam(iVar2);
    if (cVar1 != '\0') {
      return 0;
    }
  }
  uVar3 = INextBot::IsEnemy((INextBot *)(this + 0x4028),param_1);
  return uVar3;
}

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)