L L4D2node

CHostState::OnClientConnected

0x00183760 · 219 bytes · __thiscall

_ZN10CHostState17OnClientConnectedEv

Decompiled

undefined (1 param)

/* CHostState::OnClientConnected() */

void __thiscall CHostState::OnClientConnected(CHostState *this)

{
  undefined4 uVar1;
  undefined4 uVar2;
  
  if ((this[0x327] != (CHostState)0x0) &&
     (this[0x327] = (CHostState)0x0, this[0x325] != (CHostState)0x0)) {
    this[0x325] = (CHostState)0x0;
    uVar1 = va("setpos_exact %f %f %f\n",(double)*(float *)(this + 8),(double)*(float *)(this + 0xc)
               ,(double)*(float *)(this + 0x10));
    uVar2 = Cbuf_GetCurrentPlayer();
    Cbuf_AddText(uVar2,uVar1,0);
    uVar1 = va("setang_exact %f %f %f\n",(double)*(float *)(this + 0x14),
               (double)*(float *)(this + 0x18),(double)*(float *)(this + 0x1c));
    uVar2 = Cbuf_GetCurrentPlayer();
    Cbuf_AddText(uVar2,uVar1,0);
    return;
  }
  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)