L L4D2node

CBaseCombatCharacter::IsLookingTowards

0x003ff000 · 169 bytes · __thiscall

_ZNK20CBaseCombatCharacter16IsLookingTowardsERK6Vectorf

Decompiled

undefined (3 params)

/* CBaseCombatCharacter::IsLookingTowards(Vector const&, float) const */

bool __thiscall
CBaseCombatCharacter::IsLookingTowards(CBaseCombatCharacter *this,Vector *param_1,float param_2)

{
  QAngle *pQVar1;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  (**(code **)(*(int *)this + 0x234))((Vector *)&local_28,this);
  local_34 = *(float *)param_1 - local_28;
  local_30 = *(float *)(param_1 + 4) - local_24;
  local_2c = *(float *)(param_1 + 8) - local_20;
  VectorNormalize((Vector *)&local_34);
  pQVar1 = (QAngle *)(**(code **)(*(int *)this + 0x238))(this);
  AngleVectors(pQVar1,(Vector *)&local_28);
  return param_2 <= local_30 * local_24 + local_34 * local_28 + local_2c * local_20;
}

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)