CBasePlayer::UpdateClientData
0x007abba0 · 834 bytes · __thiscall
_ZN11CBasePlayer16UpdateClientDataEv
Decompiled
undefined (1 param)
/* CBasePlayer::UpdateClientData() */
void __thiscall CBasePlayer::UpdateClientData(CBasePlayer *this)
{
uint uVar1;
int *piVar2;
char cVar3;
CWorld *this_00;
undefined *puVar4;
CBasePlayer CVar5;
CBasePlayer *pCVar6;
uint uVar7;
undefined4 local_50 [3];
undefined4 local_44;
undefined4 local_40;
undefined **local_3c [11];
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
/* try { // try from 007abbc8 to 007abbcc has its CatchHandler @ 007abee8 */
CRecipientFilter::AddRecipient((CRecipientFilter *)local_3c,this);
/* try { // try from 007abbd3 to 007abee2 has its CatchHandler @ 007abefd */
CRecipientFilter::MakeReliable((CRecipientFilter *)local_3c);
if (this[0x1f44] != (CBasePlayer)0x0) {
this[0x1f44] = (CBasePlayer)0x0;
gInitHUD = 0;
UserMessageBegin((IRecipientFilter *)local_3c,"ResetHUD");
MessageWriteByte(0);
MessageEnd();
if (this[0x1f45] == (CBasePlayer)0x0) {
(**(code **)(*g_pGameRules + 0xe4))(g_pGameRules,this);
(**(code **)(*(int *)this + 0x57c))(this);
piVar2 = g_pGameRules;
this[0x1f45] = (CBasePlayer)0x1;
cVar3 = (**(code **)(*piVar2 + 0x88))(piVar2);
if (cVar3 != '\0') {
local_50[0] = 0;
local_44 = 0xffffffff;
local_40 = 0;
CEventQueue::AddEvent
((CEventQueue *)g_EventQueue,"game_player_manager","OnPlayerJoin",local_50,0,this,
this,0);
}
}
local_50[0] = 0;
local_44 = 0xffffffff;
local_40 = 0;
CEventQueue::AddEvent
((CEventQueue *)g_EventQueue,"game_player_manager","OnPlayerSpawn",local_50,0,this,
this,0);
}
this_00 = (CWorld *)GetWorldEntity();
if ((this_00 != (CWorld *)0x0) && (cVar3 = CWorld::GetDisplayTitle(this_00), cVar3 != '\0')) {
UserMessageBegin((IRecipientFilter *)local_3c,"GameTitle");
MessageEnd();
CWorld::SetDisplayTitle(this_00,false);
}
(**(code **)(*(int *)this + 0x5e0))(this);
(**(code **)(*(int *)this + 0x6c4))(this);
pCVar6 = this + 0x18f4;
do {
while ((((uVar1 = *(uint *)pCVar6, uVar1 != 0xffffffff &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
(piVar2 = *(int **)(puVar4 + 4), piVar2 != (int *)0x0))) {
(**(code **)(*piVar2 + 0x3b8))(piVar2,this);
pCVar6 = pCVar6 + 4;
if (pCVar6 == this + 0x19d4) goto LAB_007abd3d;
}
pCVar6 = pCVar6 + 4;
} while (pCVar6 != this + 0x19d4);
LAB_007abd3d:
CVar5 = (CBasePlayer)0x0;
if ((((byte)this[0x1d56] & 2) != 0) && (*(int *)(this + 0x1d98) < *(int *)(this + 0x1d94))) {
CVar5 = (CBasePlayer)(*(int *)(this + 0x100) < 100);
}
if (CVar5 != this[0x1aca]) {
(**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1aca);
this[0x1aca] = CVar5;
}
if (*(int *)(this + 0x1d34) == 0) {
if ((*(int *)(this + 0x1d30) != 0) || (uVar1 = *(uint *)(this + 0x1a7c), (uVar1 & 0x800) != 0))
goto LAB_007abda0;
uVar7 = uVar1 | 0x800;
if (uVar1 == uVar7) goto LAB_007abda0;
(**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1a7c);
*(uint *)(this + 0x1a7c) = uVar7;
if (*(int *)(this + 0x1d34) == 0) goto LAB_007abda0;
}
else {
uVar7 = *(uint *)(this + 0x1a7c);
}
if ((uVar7 & 0x800) != 0) {
if ((uVar7 & 0xfffff7ff) != uVar7) {
(**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1a7c);
*(uint *)(this + 0x1a7c) = uVar7 & 0xfffff7ff;
}
}
LAB_007abda0:
(**(code **)(*g_pGameRules + 0x1c4))(g_pGameRules,this);
local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
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.