L L4D2node

CLight::InputFadeToPattern

0x006e5d70 · 249 bytes · __thiscall

_ZN6CLight18InputFadeToPatternER11inputdata_t

Decompiled

undefined (2 params)

/* CLight::InputFadeToPattern(inputdata_t&) */

void __thiscall CLight::InputFadeToPattern(CLight *this,inputdata_t *param_1)

{
  CBaseEdict *this_00;
  undefined4 uVar1;
  int iVar2;
  CLight *pCVar3;
  uint uVar4;
  undefined1 local_14 [8];
  
  pCVar3 = *(CLight **)(this + 0x448);
  if (pCVar3 == (CLight *)0x0) {
    pCVar3 = (CLight *)&DAT_00d539c2;
  }
  this[0x44c] = *pCVar3;
  if (*(int *)(param_1 + 0x18) == 2) {
    pCVar3 = (CLight *)&DAT_00d539c2;
    if (*(CLight **)(param_1 + 8) != (CLight *)0x0) {
      pCVar3 = *(CLight **)(param_1 + 8);
    }
  }
  else {
    pCVar3 = (CLight *)variant_t::ToString((variant_t *)(param_1 + 8));
  }
  this[0x44d] = *pCVar3;
  uVar1 = 0;
  if (*(int *)(param_1 + 0x18) == 2) {
    uVar1 = *(undefined4 *)(param_1 + 8);
  }
  *(undefined4 *)(this + 0x448) = uVar1;
  CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)FadeThink);
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
  uVar4 = *(uint *)(this + 0x148) & 0xfffffffe;
  if (*(uint *)(this + 0x148) != uVar4) {
    if (this[0x6c] == (CLight)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar2 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar2 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CLight)((byte)this[0x70] | 1);
    }
    *(uint *)(this + 0x148) = uVar4;
  }
  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)