L L4D2node

KeyValues::SetColor

0x00043140 · 73 bytes · __thiscall

_ZN9KeyValues8SetColorEPKc5Color

Decompiled

undefined (3 params)

/* KeyValues::SetColor(char const*, Color) */

void __thiscall KeyValues::SetColor(KeyValues *this,char *param_1,undefined4 param_3)

{
  int iVar1;
  
  iVar1 = FindKey(this,param_1,true);
  if (iVar1 != 0) {
    *(char *)(iVar1 + 0xc) = (char)param_3;
    *(char *)(iVar1 + 0xd) = (char)((uint)param_3 >> 8);
    *(undefined1 *)(iVar1 + 0x10) = 6;
    *(char *)(iVar1 + 0xe) = (char)((uint)param_3 >> 0x10);
    *(char *)(iVar1 + 0xf) = (char)((uint)param_3 >> 0x18);
  }
  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)