L L4D2node

CTerrorPlayer::InputSetCommentaryStatueMode

0x00997d20 · 225 bytes · __thiscall

_ZN13CTerrorPlayer28InputSetCommentaryStatueModeER11inputdata_t

Decompiled

undefined (2 params)

/* CTerrorPlayer::InputSetCommentaryStatueMode(inputdata_t&) */

void __thiscall
CTerrorPlayer::InputSetCommentaryStatueMode(CTerrorPlayer *this,inputdata_t *param_1)

{
  CTerrorPlayer CVar1;
  
  CVar1 = *(CTerrorPlayer *)(param_1 + 8);
  if (*(int *)(param_1 + 0x18) == 6) {
    if (this[0x4014] == CVar1) {
      return;
    }
    this[0x4014] = CVar1;
    if (CVar1 != (CTerrorPlayer)0x0) {
      CBaseEntity::AddFlag((CBaseEntity *)this,0x20);
      if (*(int *)(this + 0xfc) != 0x100000) {
        (**(code **)(*(int *)this + 0x20c))(this,this + 0xfc);
        *(undefined4 *)(this + 0xfc) = 0x100000;
      }
      if (*(int *)(this + 0x100) == 0x100000) {
        return;
      }
      (**(code **)(*(int *)this + 0x214))(this,this + 0x100);
      *(undefined4 *)(this + 0x100) = 0x100000;
      return;
    }
  }
  else {
    if (this[0x4014] == (CTerrorPlayer)0x0) {
      return;
    }
    this[0x4014] = (CTerrorPlayer)0x0;
  }
  CBaseEntity::RemoveFlag((CBaseEntity *)this,0x20);
  if (*(int *)(this + 0x100) != 1) {
    (**(code **)(*(int *)this + 0x214))(this,this + 0x100);
    *(undefined4 *)(this + 0x100) = 1;
  }
  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)