L L4D2node

CFunc_Dust::KeyValue

0x006bb220 · 290 bytes · __thiscall

_ZN10CFunc_Dust8KeyValueEPKcS1_

Decompiled

undefined (3 params)

/* CFunc_Dust::KeyValue(char const*, char const*) */

undefined4 __thiscall CFunc_Dust::KeyValue(CFunc_Dust *this,char *param_1,char *param_2)

{
  CFunc_Dust CVar1;
  uint uVar2;
  CBaseEdict *this_00;
  int iVar3;
  long lVar4;
  undefined4 uVar5;
  uint uVar6;
  
  iVar3 = _V_stricmp(param_1,"StartDisabled");
  if (iVar3 == 0) {
    uVar2 = *(uint *)(this + 0x464);
    if (*param_2 == '1') {
      uVar6 = uVar2 & 0xfffffffe;
      if (uVar2 == uVar6) {
        return 1;
      }
      CVar1 = this[0x6c];
      goto joined_r0x006bb262;
    }
    uVar6 = uVar2 | 1;
    if (uVar2 == uVar6) {
      return 1;
    }
  }
  else {
    iVar3 = _V_stricmp(param_1,"Alpha");
    if (iVar3 == 0) {
      lVar4 = strtol(param_2,(char **)0x0,10);
      *(long *)(this + 0x468) = lVar4;
      return 1;
    }
    iVar3 = _V_stricmp(param_1,"Frozen");
    if (iVar3 != 0) {
      uVar5 = CBaseEntity::KeyValue((CBaseEntity *)this,param_1,param_2);
      return uVar5;
    }
    uVar2 = *(uint *)(this + 0x464);
    if (*param_2 == '1') {
      uVar6 = uVar2 | 4;
    }
    else {
      uVar6 = uVar2 & 0xfffffffb;
    }
    if (uVar2 == uVar6) {
      return 1;
    }
  }
  CVar1 = this[0x6c];
joined_r0x006bb262:
  if (CVar1 == (CFunc_Dust)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] = (CFunc_Dust)((byte)this[0x70] | 1);
  }
  *(uint *)(this + 0x464) = uVar6;
  return 1;
}

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)