L L4D2node

CServerGameClients::ClientPutInServer

0x006c5450 · 265 bytes · __thiscall

_ZN18CServerGameClients17ClientPutInServerEP7edict_tPKc

Decompiled

undefined (3 params)

/* CServerGameClients::ClientPutInServer(edict_t*, char const*) */

void __thiscall
CServerGameClients::ClientPutInServer(CServerGameClients *this,edict_t *param_1,char *param_2)

{
  int *piVar1;
  char cVar2;
  bool bVar3;
  CBasePlayer *this_00;
  int iVar4;
  CBasePlayer *pCVar5;
  
  if (g_pClientPutInServerOverride == (code *)0x0) {
    ::ClientPutInServer(param_1,param_2);
  }
  else {
    (*g_pClientPutInServerOverride)();
  }
  if ((param_1 == (edict_t *)0x0) || (piVar1 = *(int **)(param_1 + 0xc), piVar1 == (int *)0x0)) {
    return;
  }
  this_00 = (CBasePlayer *)(**(code **)(*piVar1 + 0x18))(piVar1);
  if (this_00 == (CBasePlayer *)0x0) {
    return;
  }
  cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
  if (cVar2 == '\0') {
    return;
  }
  if (*(int *)(this_00 + 0x30) == 0) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)(this_00 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
  }
  bVar3 = (bool)(**(code **)(*engine + 0x1c8))(engine,iVar4);
  if (bVar3 != false) {
    if (*(int *)(this_00 + 0x30) == 0) {
      iVar4 = 0;
    }
    else {
      iVar4 = *(int *)(this_00 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
    iVar4 = (**(code **)(*engine + 0x1cc))(engine,iVar4);
    if ((iVar4 != 0) && (piVar1 = *(int **)(iVar4 + 0xc), piVar1 != (int *)0x0)) {
      pCVar5 = (CBasePlayer *)(**(code **)(*piVar1 + 0x18))(piVar1);
      goto LAB_006c551e;
    }
  }
  pCVar5 = (CBasePlayer *)0x0;
LAB_006c551e:
  CBasePlayer::SetSplitScreenPlayer(this_00,bVar3,pCVar5);
  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)