L L4D2node

CServerGameClients::ClientCommandKeyValues

0x006cc590 · 386 bytes · __thiscall

_ZN18CServerGameClients22ClientCommandKeyValuesEP7edict_tP9KeyValues

Decompiled

undefined (3 params)

/* CServerGameClients::ClientCommandKeyValues(edict_t*, KeyValues*) */

void __thiscall
CServerGameClients::ClientCommandKeyValues
          (CServerGameClients *this,edict_t *param_1,KeyValues *param_2)

{
  int *piVar1;
  edict_t *peVar2;
  char *pcVar3;
  int iVar4;
  CRecipientFilter *local_40;
  CRecipientFilter local_3c [44];
  
  peVar2 = param_1;
  if (((param_1 != (edict_t *)0x0) ||
      ((peVar2 = *(edict_t **)(gpGlobals + 0x58), peVar2 != (edict_t *)0x0 &&
       (((byte)*peVar2 & 2) == 0)))) && (piVar1 = *(int **)(peVar2 + 0xc), piVar1 != (int *)0x0)) {
    (**(code **)(*piVar1 + 0x18))(piVar1);
  }
  if (param_2 != (KeyValues *)0x0) {
    pcVar3 = (char *)KeyValues::GetName(param_2);
    if ((pcVar3 != "avatarinfo") && (iVar4 = _V_stricmp(pcVar3,"avatarinfo"), iVar4 != 0)) {
      if ((pcVar3 == "FreeWeekendUserEscaped") ||
         (iVar4 = _V_stricmp(pcVar3,"FreeWeekendUserEscaped"), iVar4 == 0)) {
        CRecipientFilter::CRecipientFilter(local_3c);
        local_40 = local_3c;
                    /* try { // try from 006cc6cc to 006cc6fc has its CatchHandler @ 006cc71e */
        ForEachTerrorPlayer<AddRecipientsToFilter>((AddRecipientsToFilter *)&local_40,true);
        UserMessageBegin((IRecipientFilter *)local_3c,"AchievementEvent");
        MessageWriteShort(0x4c);
        (**(code **)(*engine + 0xb4))(engine);
      }
      else {
        if ((pcVar3 != "FreeChristmasUserEscaped") &&
           (iVar4 = _V_stricmp(pcVar3,"FreeChristmasUserEscaped"), iVar4 != 0)) {
          return;
        }
        CRecipientFilter::CRecipientFilter(local_3c);
        local_40 = local_3c;
                    /* try { // try from 006cc65c to 006cc68c has its CatchHandler @ 006cc730 */
        ForEachTerrorPlayer<AddRecipientsToFilter>((AddRecipientsToFilter *)&local_40,true);
        UserMessageBegin((IRecipientFilter *)local_3c,"AchievementEvent");
        MessageWriteShort(0x4d);
        (**(code **)(*engine + 0xb4))(engine);
      }
      g_pMsgBuffer = 0;
      CRecipientFilter::~CRecipientFilter(local_3c);
      return;
    }
    CDirector::PlayerAvatarSet(TheDirector,(KeyValues *)param_1);
  }
  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)