L L4D2node

CHLTVDirector::UpdateSettings

0x006dc610 · 161 bytes · __thiscall

_ZN13CHLTVDirector14UpdateSettingsEv

Decompiled

undefined (1 param)

/* CHLTVDirector::UpdateSettings() */

void __thiscall CHLTVDirector::UpdateSettings(CHLTVDirector *this)

{
  float fVar1;
  CBaseEntity *this_00;
  int iVar2;
  int iVar3;
  
  iVar2 = gpGlobals;
  fVar1 = *(float *)(tv_delay._28_4_ + 0x2c);
  *(float *)(this + 0x18) = fVar1;
  iVar3 = *(int *)(iVar2 + 0x18);
  if (10.0 <= fVar1) {
    iVar3 = iVar3 - (int)(fVar1 / *(float *)(iVar2 + 0x1c) + 0.5);
  }
  else {
    *(undefined4 *)(this + 0x18) = 0;
  }
  if ((*(int *)(this + 0x1c) == 0) && (0 < iVar3)) {
    *(undefined4 *)(this + 0x38) = 0;
  }
  if (0 < *(int *)(this + 0x1cc)) {
    this_00 = (CBaseEntity *)UTIL_PlayerByIndex(*(int *)(this + 0x1cc));
    if (this_00 != (CBaseEntity *)0x0) {
      iVar2 = CBaseEntity::GetTeamNumber(this_00);
      if (iVar2 == 1) goto LAB_006dc68b;
    }
    SetCameraMan(this,0);
  }
LAB_006dc68b:
  iVar2 = 0;
  if (-1 < iVar3) {
    iVar2 = iVar3;
  }
  *(int *)(this + 0x1c) = iVar2;
  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)