CBaseServer::CreateSplitClient
0x0010b7d0 · 286 bytes · __thiscall
_ZN11CBaseServer17CreateSplitClientER10CUtlVectorI16NetMessageCvar_t10CUtlMemoryIS1_iEEP11CBaseClient
Decompiled
undefined (3 params)
/* CBaseServer::CreateSplitClient(CUtlVector<NetMessageCvar_t, CUtlMemory<NetMessageCvar_t, int> >&,
CBaseClient*) */
int * __thiscall
CBaseServer::CreateSplitClient(CBaseServer *this,CUtlVector *param_1,CBaseClient *param_2)
{
int iVar1;
char cVar2;
int *piVar3;
char *pcVar4;
undefined4 uVar5;
undefined4 uVar6;
int in_GS_OFFSET;
netadr_s local_2c [12];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
netadr_s::SetIP(local_2c,0);
netadr_s::SetPort(local_2c,0);
netadr_s::SetType(local_2c,3);
piVar3 = (int *)GetFreeClientInternal(this,local_2c);
if (piVar3 != (int *)0x0) {
pcVar4 = (char *)netadr_s::ToString(local_2c,false);
uVar5 = NET_CreateNetChannel
(*(int *)(this + 8),local_2c,pcVar4,(INetChannelHandler *)(piVar3 + 1),true);
uVar6 = GetNextUserID(this);
*(undefined4 *)(this + 0x100) = uVar6;
(**(code **)(*piVar3 + 0x30))(piVar3,"split",uVar6,uVar5,1,param_1);
*(undefined1 *)(piVar3 + 4) = 1;
piVar3[10] = (int)param_2;
iVar1 = *(int *)(this + 0xc);
*(undefined1 *)((int)piVar3 + 0x11) = 1;
piVar3[0x3e] = iVar1;
cVar2 = (**(code **)(*piVar3 + 0x40))(piVar3);
*(undefined1 *)((int)piVar3 + 0x11) = 0;
if (cVar2 != '\0') goto LAB_0010b8d1;
}
piVar3 = (int *)0x0;
LAB_0010b8d1:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return piVar3;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.