L L4D2node

CColorCorrection::CColorCorrection

0x00646240 · 959 bytes · __thiscall

_ZN16CColorCorrectionC2Ev

Decompiled

undefined (1 param)

/* CColorCorrection::CColorCorrection() */

void __thiscall CColorCorrection::CColorCorrection(CColorCorrection *this)

{
  float fVar1;
  undefined4 uVar2;
  CBaseEdict *pCVar3;
  CColorCorrection CVar4;
  int iVar5;
  
  CBaseEntity::CBaseEntity((CBaseEntity *)this,false);
  *(undefined ***)this = &PTR__CColorCorrection_00c6a088;
  if (this[0x45d] == (CColorCorrection)0x1) {
    fVar1 = *(float *)(this + 0x464);
    CVar4 = this[0x6c];
  }
  else {
    if (this[0x6c] == (CColorCorrection)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 == (CBaseEdict *)0x0) {
        CVar4 = (CColorCorrection)0x0;
      }
      else {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
                    /* try { // try from 0064628c to 006465c6 has its CatchHandler @ 00646687 */
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
        CVar4 = this[0x6c];
      }
    }
    else {
      this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
      CVar4 = (CColorCorrection)0x1;
    }
    fVar1 = *(float *)(this + 0x464);
    this[0x45d] = (CColorCorrection)0x1;
  }
  if (fVar1 != 0.0) {
    if (CVar4 == (CColorCorrection)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
        CVar4 = this[0x6c];
      }
    }
    else {
      this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x464) = 0;
  }
  if (*(float *)(this + 0x468) != 1000.0) {
    if (CVar4 == (CColorCorrection)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
        CVar4 = this[0x6c];
      }
    }
    else {
      this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x468) = 0x447a0000;
  }
  if (*(float *)(this + 0x458) != 1.0) {
    if (CVar4 == (CColorCorrection)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
        CVar4 = this[0x6c];
      }
    }
    else {
      this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x458) = 0x3f800000;
  }
  if (*(float *)(this + 0x46c) != 0.0) {
    if (CVar4 == (CColorCorrection)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
        CVar4 = this[0x6c];
      }
    }
    else {
      this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x46c) = 0;
  }
  if (*(float *)(this + 0x440) != 0.0) {
    if (CVar4 == (CColorCorrection)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
        CVar4 = this[0x6c];
      }
    }
    else {
      this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x440) = 0;
  }
  if (*(float *)(this + 0x444) != 0.0) {
    if (CVar4 == (CColorCorrection)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
        CVar4 = this[0x6c];
      }
    }
    else {
      this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x444) = 0;
  }
  *(undefined4 *)(this + 0x448) = 0;
  *(undefined4 *)(this + 0x44c) = 0;
  *(undefined4 *)(this + 0x450) = 0;
  *(undefined4 *)(this + 0x454) = 0;
  if (CVar4 == (CColorCorrection)0x0) {
    pCVar3 = *(CBaseEdict **)(this + 0x30);
    if (pCVar3 != (CBaseEdict *)0x0) {
      *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
      iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
      *(undefined2 *)(iVar5 + 2) = 0;
    }
  }
  else {
    this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
  }
  uVar2 = *(undefined4 *)(gpGlobals + 0xc);
  *(undefined4 *)(this + 0x78) = 0;
  this[0x470] = (CColorCorrection)0x0;
  *(undefined4 *)(this + 0x74) = uVar2;
  *(undefined4 *)(this + 0x574) = 0;
  if (this[0x45e] != (CColorCorrection)0x0) {
    if (this[0x6c] == (CColorCorrection)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
    }
    this[0x45e] = (CColorCorrection)0x0;
  }
  if (this[0x45f] != (CColorCorrection)0x0) {
    if (this[0x6c] == (CColorCorrection)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
    }
    this[0x45f] = (CColorCorrection)0x0;
  }
  if (this[0x460] != (CColorCorrection)0x0) {
    if (this[0x6c] == (CColorCorrection)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
      this[0x460] = (CColorCorrection)0x0;
    }
    else {
      this[0x70] = (CColorCorrection)((byte)this[0x70] | 1);
      this[0x460] = (CColorCorrection)0x0;
    }
    return;
  }
  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)