L L4D2node

CTerrorPlayer::OnClientSettingsChanged

0x0099e610 · 213 bytes · __thiscall

_ZN13CTerrorPlayer23OnClientSettingsChangedEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::OnClientSettingsChanged() */

void __thiscall CTerrorPlayer::OnClientSettingsChanged(CTerrorPlayer *this)

{
  char cVar1;
  char *pcVar2;
  int iVar3;
  char **ppcVar4;
  char *pcVar5;
  char *pcVar6;
  undefined1 *puVar7;
  char *local_24;
  undefined *local_20;
  char *local_1c [3];
  
  pcVar2 = "90";
  pcVar5 = "fov_desired";
  pcVar6 = "fov_desired";
  puVar7 = &DAT_00c54d8d;
  local_24 = "voice_spatialize";
  local_20 = &DAT_00c09604;
  ppcVar4 = &local_24;
  while( true ) {
    cVar1 = (**(code **)(*(int *)this + 0x778))(this);
    if (((cVar1 == '\0') || (pcVar2 == (char *)0x0)) || (*pcVar2 == '\0')) {
      if (*(int *)(this + 0x30) == 0) {
        iVar3 = 0;
      }
      else {
        iVar3 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
      }
      pcVar2 = (char *)(**(code **)(*engine + 0xe0))
                                 (engine,iVar3,pcVar5,*(code **)(*engine + 0xe0),pcVar6,puVar7);
      if (pcVar2 != (char *)0x0) {
        KeyValues::SetString(*(KeyValues **)(this + 0x2d38),pcVar5,pcVar2);
      }
    }
    else {
      KeyValues::SetString(*(KeyValues **)(this + 0x2d38),pcVar5,pcVar2);
    }
    if (ppcVar4 == local_1c) break;
    pcVar5 = *ppcVar4;
    pcVar2 = ppcVar4[1];
    ppcVar4 = ppcVar4 + 2;
  }
  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)