L L4D2node

CBaseCombatCharacter::IsInFieldOfView

0x003ff310 · 150 bytes · __thiscall

_ZNK20CBaseCombatCharacter15IsInFieldOfViewERK6Vector

Decompiled

undefined (2 params)

/* CBaseCombatCharacter::IsInFieldOfView(Vector const&) const */

void __thiscall CBaseCombatCharacter::IsInFieldOfView(CBaseCombatCharacter *this,Vector *param_1)

{
  code *pcVar1;
  char cVar2;
  int iVar3;
  CBasePlayer *this_00;
  float fVar4;
  
  if (this != (CBaseCombatCharacter *)0x0) {
    cVar2 = (**(code **)(*(int *)this + 0x16c))(this);
    if (cVar2 != '\0') {
      pcVar1 = *(code **)(*(int *)this + 0x420);
      cVar2 = (**(code **)(*(int *)this + 0x16c))(this);
      this_00 = (CBasePlayer *)0x0;
      if (cVar2 != '\0') {
        this_00 = (CBasePlayer *)this;
      }
      iVar3 = CBasePlayer::GetFOV(this_00);
      fVar4 = cosf((float)iVar3 * 0.5);
      (*pcVar1)(this,param_1,fVar4);
      return;
    }
  }
  (**(code **)(*(int *)this + 0x420))(this,param_1,0x3f666666);
  return;
}

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)