L L4D2node

CBasePlayer::InputSetPostProcessController

0x007b7de0 · 339 bytes · __thiscall

_ZN11CBasePlayer29InputSetPostProcessControllerER11inputdata_t

Decompiled

undefined (2 params)

/* CBasePlayer::InputSetPostProcessController(inputdata_t&) */

void __thiscall CBasePlayer::InputSetPostProcessController(CBasePlayer *this,inputdata_t *param_1)

{
  uint uVar1;
  CBaseEdict *this_00;
  char *pcVar2;
  int iVar3;
  int *piVar4;
  undefined4 *puVar5;
  undefined *puVar6;
  
  if (*(int *)(param_1 + 0x18) == 0xd) {
    uVar1 = *(uint *)(param_1 + 0x14);
    if (uVar1 == 0xffffffff) {
      return;
    }
    puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
    if (puVar6 == (undefined *)0xfffffffc) {
      return;
    }
    if (*(uint *)(puVar6 + 8) != uVar1 >> 0xc) {
      return;
    }
    iVar3 = *(int *)(puVar6 + 4);
  }
  else {
    if (*(int *)(param_1 + 0x18) == 2) {
      pcVar2 = "";
      if (*(char **)(param_1 + 8) != (char *)0x0) {
        pcVar2 = *(char **)(param_1 + 8);
      }
    }
    else {
      pcVar2 = (char *)variant_t::ToString((variant_t *)(param_1 + 8));
    }
    iVar3 = CGlobalEntityList::FindEntityByName
                      ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar2,(CBaseEntity *)0x0,
                       (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
  }
  if ((iVar3 != 0) &&
     (piVar4 = (int *)__dynamic_cast(iVar3,&CBaseEntity::typeinfo,&CPostProcessController::typeinfo,
                                     0), piVar4 != (int *)0x0)) {
    uVar1 = *(uint *)(this + 0x1c60);
    if ((uVar1 != 0xffffffff) &&
       (((puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc &&
         (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (piVar4 == *(int **)(puVar6 + 4))))) {
      return;
    }
    if (this[0x6c] == (CBasePlayer)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    puVar5 = (undefined4 *)(**(code **)(*piVar4 + 0xc))(piVar4);
    *(undefined4 *)(this + 0x1c60) = *puVar5;
  }
  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)