L L4D2node

CEmbers::EmberUse

0x0066d550 · 303 bytes · __thiscall

_ZN7CEmbers8EmberUseEP11CBaseEntityS1_8USE_TYPEf

Decompiled

undefined (5 params)

/* CEmbers::EmberUse(CBaseEntity*, CBaseEntity*, USE_TYPE, float) */

void __thiscall
CEmbers::EmberUse(CEmbers *this,undefined4 param_1,undefined4 param_2,int param_4,float param_5)

{
  CEmbers CVar1;
  CBaseEdict *pCVar2;
  int iVar3;
  CEmbers CVar4;
  
  if (((byte)this[0x148] & 2) == 0) {
    *(undefined4 *)(this + 0xe0) = 0;
    *(undefined4 *)(this + 0xe4) = 0;
  }
  if (param_4 == 1) {
    if (this[0x44c] != (CEmbers)0x1) {
      if (this[0x6c] == (CEmbers)0x0) {
        pCVar2 = *(CBaseEdict **)(this + 0x30);
        if (pCVar2 != (CBaseEdict *)0x0) {
          *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
          iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
          *(undefined2 *)(iVar3 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CEmbers)((byte)this[0x70] | 1);
      }
      this[0x44c] = (CEmbers)0x1;
      return;
    }
    return;
  }
  if (param_4 == 2) {
    CVar4 = (CEmbers)((int)param_5 != 0);
    if (CVar4 == this[0x44c]) {
      return;
    }
    CVar1 = this[0x6c];
  }
  else {
    if (param_4 == 0) {
      if (this[0x44c] != (CEmbers)0x0) {
        if (this[0x6c] == (CEmbers)0x0) {
          pCVar2 = *(CBaseEdict **)(this + 0x30);
          if (pCVar2 != (CBaseEdict *)0x0) {
            *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
            iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
            *(undefined2 *)(iVar3 + 2) = 0;
          }
        }
        else {
          this[0x70] = (CEmbers)((byte)this[0x70] | 1);
        }
        this[0x44c] = (CEmbers)0x0;
        return;
      }
      return;
    }
    CVar4 = (CEmbers)((byte)this[0x44c] ^ 1);
    if (this[0x44c] == CVar4) {
      return;
    }
    CVar1 = this[0x6c];
  }
  if (CVar1 == (CEmbers)0x0) {
    pCVar2 = *(CBaseEdict **)(this + 0x30);
    if (pCVar2 != (CBaseEdict *)0x0) {
      *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
      iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
      *(undefined2 *)(iVar3 + 2) = 0;
    }
  }
  else {
    this[0x70] = (CEmbers)((byte)this[0x70] | 1);
  }
  this[0x44c] = CVar4;
  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)