CBaseClient::Disconnect
0x000f7940 · 541 bytes · __thiscall
_ZN11CBaseClient10DisconnectEPKcz
Decompiled
undefined (2 params)
/* CBaseClient::Disconnect(char const*, ...) */
void __thiscall CBaseClient::Disconnect(CBaseClient *this,char *param_1,...)
{
int *piVar1;
char cVar2;
int iVar3;
CBaseClient *pCVar4;
int iVar5;
undefined ***pppuVar6;
CSteam3Server *this_00;
int in_GS_OFFSET;
undefined1 uStack_471;
undefined **local_470;
undefined1 local_46c;
undefined4 local_468;
undefined4 local_464;
undefined4 local_460;
undefined8 local_45c;
undefined4 local_454;
undefined4 local_450;
undefined8 local_44c;
undefined4 local_444;
undefined4 local_440;
undefined1 local_43c;
undefined8 local_438;
undefined4 local_430;
undefined4 local_42c;
undefined4 local_424;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((((*(int *)(this + 0xec) != 0) && (iVar5 = *(int *)(this + 0x30), -1 < iVar5)) &&
(iVar3 = (**(code **)(**(int **)(this + 0xb8) + 0x20))(*(int **)(this + 0xb8)), iVar5 < iVar3)
) && (pCVar4 = (CBaseClient *)
(**(code **)(**(int **)(this + 0xb8) + 0x1c))
(*(int **)(this + 0xb8),*(undefined4 *)(this + 0x30)),
pCVar4 == this + 4)) {
cVar2 = (**(code **)(*(int *)this + 0x94))(this);
if ((cVar2 == '\0') || (this[0x11] != (CBaseClient)0x0)) {
cVar2 = (**(code **)(*(int *)this + 0x94))(this);
iVar5 = DAT_003a1734;
if (cVar2 == '\0') {
for (; 1 < iVar5; iVar5 = iVar5 + -1) {
piVar1 = *(int **)(this + iVar5 * 4 + 0x14);
if (piVar1 != (int *)0x0) {
(**(code **)(*piVar1 + 0x114))(piVar1,"leaving splitscreen");
*(undefined4 *)(this + iVar5 * 4 + 0x14) = 0;
}
}
}
V_strncpy((char *)&local_470,param_1,0x400);
iVar5 = _V_strlen((char *)&local_470);
if ((0 < iVar5) && ((&uStack_471)[iVar5] == '\n')) {
pppuVar6 = (undefined ***)((int)&local_470 + iVar5 + -1);
do {
*(char *)pppuVar6 = '\0';
if (pppuVar6 == &local_470) break;
pppuVar6 = (undefined ***)((int)pppuVar6 + -1);
} while (*(char *)pppuVar6 == '\n');
}
(**(code **)(*(int *)this + 0x114))(this,&local_470);
NotifyDedicatedServerUI("UpdatePlayers");
this_00 = (CSteam3Server *)Steam3Server();
CSteam3Server::SendUpdatedServerDetails(this_00);
}
else {
local_424 = va("ss_disconnect %d\n",*(undefined4 *)(this + 0x14));
local_464 = 0;
local_460 = 0;
local_45c = 0;
local_454 = 0;
local_450 = 0;
local_44c = 0;
local_444 = 0;
local_440 = 0;
local_43c = 0;
local_438 = 0;
local_430 = 0;
local_42c = 0;
local_46c = 1;
local_468 = 0;
local_470 = &PTR__NET_StringCmd_002a17c8;
(**(code **)(*(int *)this + 100))(this,&local_470,1,0);
}
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
SourceMod gamedata
paste intoaddons/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.
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.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.