CBaseClientState::SetSignonState
0x000fe210 · 360 bytes · __cdecl
_ZN16CBaseClientState14SetSignonStateEiiP15NET_SignonState
Decompiled
undefined (3 params)
/* CBaseClientState::SetSignonState(int, int, NET_SignonState*) */
undefined4 CBaseClientState::SetSignonState(int param_1,int param_2,NET_SignonState *param_3)
{
undefined4 uVar1;
int in_GS_OFFSET;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((uint)param_2 < 8) {
if ((2 < param_2) && (param_2 <= *(int *)(param_1 + 0x60))) {
uVar1 = (**(code **)(**(int **)(param_1 + 0x10) + 0x20))(*(int **)(param_1 + 0x10));
if ((char)uVar1 == '\0') {
ConMsg("Received signon %i when at %i\n",param_2,*(undefined4 *)(param_1 + 0x60));
goto LAB_000fe292;
}
}
if (((param_3 != *(NET_SignonState **)(param_1 + 0x6c)) &&
(param_3 != (NET_SignonState *)&DAT_ffffffff)) &&
(*(NET_SignonState **)(param_1 + 0x6c) != (NET_SignonState *)&DAT_ffffffff)) {
uVar1 = (**(code **)(**(int **)(param_1 + 0x10) + 0x20))(*(int **)(param_1 + 0x10));
if ((char)uVar1 == '\0') {
ConMsg("Received wrong spawn count %i when at %i\n",param_3,*(undefined4 *)(param_1 + 0x6c))
;
goto LAB_000fe292;
}
}
if ((*(int *)(param_1 + 0x60) < 2) && (1 < param_2)) {
netadr_s::SetIP((netadr_s *)&local_34,0);
netadr_s::SetPort((netadr_s *)&local_34,0);
netadr_s::SetType((netadr_s *)&local_34,3);
local_24 = 0;
local_28 = 0;
*(undefined4 *)(param_1 + 0x50) = 0;
*(undefined4 *)(param_1 + 0x40) = 0xbf800000;
*(undefined4 *)(param_1 + 0x44) = local_34;
*(undefined4 *)(param_1 + 0x48) = local_30;
*(undefined4 *)(param_1 + 0x4c) = local_2c;
*(undefined4 *)(param_1 + 0x54) = 0;
}
*(int *)(param_1 + 0x60) = param_2;
uVar1 = 1;
}
else {
ConMsg("Received signon %i when at %i\n",param_2,*(undefined4 *)(param_1 + 0x60));
uVar1 = 0;
}
LAB_000fe292:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.