L L4D2node

CServerTools::SetPlayerFOV

0x00680b70 · 166 bytes · __thiscall

_ZN12CServerTools12SetPlayerFOVEiP13IClientEntity

Decompiled

undefined (3 params)

/* CServerTools::SetPlayerFOV(int, IClientEntity*) */

undefined4 __thiscall
CServerTools::SetPlayerFOV(CServerTools *this,int param_1,IClientEntity *param_2)

{
  uint uVar1;
  CBasePlayer *this_00;
  undefined4 uVar2;
  CBasePlayer *pCVar3;
  undefined *puVar4;
  
  this_00 = (CBasePlayer *)(**(code **)(*(int *)this + 8))(this,param_2);
  if ((this_00 == (CBasePlayer *)0x0) &&
     (this_00 = (CBasePlayer *)UTIL_GetLocalPlayer(), this_00 == (CBasePlayer *)0x0)) {
    uVar2 = 0;
  }
  else {
    CBasePlayer::SetDefaultFOV(this_00,param_1);
    uVar1 = *(uint *)(this_00 + 0x1d84);
    pCVar3 = this_00;
    if ((((uVar1 != 0xffffffff) &&
         (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
       (pCVar3 = (CBasePlayer *)*(CBaseEntity **)(puVar4 + 4),
       *(CBaseEntity **)(puVar4 + 4) == (CBaseEntity *)0x0)) {
      pCVar3 = this_00;
    }
    uVar2 = CBasePlayer::SetFOV(this_00,(CBaseEntity *)pCVar3,param_1,0.0,0);
  }
  return uVar2;
}

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)