L L4D2node

CTerrorPlayer::GetDebugColorForSurvivor

0x009fd000 · 299 bytes · __cdecl

_ZN13CTerrorPlayer24GetDebugColorForSurvivorE21SurvivorCharacterTypeRiS1_S1_

Decompiled

undefined (4 params)

/* CTerrorPlayer::GetDebugColorForSurvivor(SurvivorCharacterType, int&, int&, int&) */

void CTerrorPlayer::GetDebugColorForSurvivor
               (undefined4 *param_1,int param_2,undefined4 param_3,undefined4 *param_4,
               undefined4 *param_5,undefined4 *param_6)

{
  *param_1 = 0;
  switch(*(undefined4 *)(param_2 + 0x2ba0)) {
  case 0:
    *param_4 = 0;
    *param_5 = 0xff;
    *param_6 = 0;
    return;
  case 1:
    *param_4 = 0xff;
    *param_5 = 0;
    *param_6 = 0;
    return;
  case 2:
    *param_4 = 0;
    *param_5 = 0;
    *param_6 = 0xff;
    return;
  case 3:
    *param_4 = 0x96;
    *param_5 = 0x96;
    *param_6 = 0;
    return;
  case 4:
    *param_4 = 0xff;
    *param_5 = 0xff;
    *param_6 = 0;
    return;
  case 5:
    *param_4 = 0xff;
    *param_5 = 0;
    *param_6 = 0xff;
    return;
  case 6:
    *param_4 = 0;
    *param_5 = 0x96;
    *param_6 = 0x96;
    return;
  case 7:
    *param_4 = 0x96;
    *param_5 = 0;
    *param_6 = 0x96;
    return;
  default:
    *param_4 = 0xff;
    *param_5 = 0;
    *param_6 = 0xff;
    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)