L L4D2node

CBasePlayer::GetFOVDistanceAdjustFactorForNetworking

0x007b71c0 · 98 bytes · __thiscall

_ZN11CBasePlayer39GetFOVDistanceAdjustFactorForNetworkingEv

Decompiled

undefined (1 param)

/* CBasePlayer::GetFOVDistanceAdjustFactorForNetworking() */

longdouble __thiscall CBasePlayer::GetFOVDistanceAdjustFactorForNetworking(CBasePlayer *this)

{
  int iVar1;
  float fVar2;
  
  iVar1 = GetDefaultFOV(this);
  fVar2 = (float)iVar1;
  iVar1 = GetFOVForNetworking(this);
  if ((0.001 <= fVar2) && ((float)iVar1 != fVar2)) {
    return (longdouble)((float)iVar1 / fVar2);
  }
  return (longdouble)1.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)