CServerGameDLL::PreClientUpdate
0x006c9d70 · 399 bytes · __thiscall
_ZN14CServerGameDLL15PreClientUpdateEb
Decompiled
undefined (2 params)
/* CServerGameDLL::PreClientUpdate(bool) */
void __thiscall CServerGameDLL::PreClientUpdate(CServerGameDLL *this,bool param_1)
{
uint uVar1;
byte *pbVar2;
int *piVar3;
char *pcVar4;
CBaseAnimating *pCVar5;
byte *pbVar6;
int iVar7;
CBaseEntity *pCVar8;
if (!param_1) {
return;
}
DrawAllDebugOverlays();
IGameSystem::PreClientUpdateAllSystems();
uVar1 = *(uint *)(sv_showhitboxes._28_4_ + 0x30);
if (uVar1 == 0xffffffff) {
return;
}
if (uVar1 == 0) {
pCVar8 = (CBaseEntity *)0x0;
while( true ) {
pcVar4 = "FCVAR_NEVER_AS_STRING";
if (((sv_showhitboxes[0x15] & 0x10) == 0) &&
(pcVar4 = *(char **)(sv_showhitboxes._28_4_ + 0x24), pcVar4 == (char *)0x0)) {
pcVar4 = "";
}
pCVar8 = (CBaseEntity *)
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,pCVar8,pcVar4,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
if (pCVar8 == (CBaseEntity *)0x0) break;
pCVar5 = (CBaseAnimating *)
__dynamic_cast(pCVar8,&CBaseEntity::typeinfo,&CBaseAnimating::typeinfo,0);
if (pCVar5 != (CBaseAnimating *)0x0) {
CBaseAnimating::DrawServerHitboxes(pCVar5,0.0,false);
}
}
return;
}
if (uVar1 < 0x800) {
pbVar2 = *(byte **)(gpGlobals + 0x58);
if (pbVar2 == (byte *)0x0) {
return;
}
pbVar6 = pbVar2 + uVar1 * 0x10;
if ((*pbVar6 & 2) == 0) goto LAB_006c9e86;
}
else {
pbVar2 = *(byte **)(gpGlobals + 0x58);
if (*(byte **)(gpGlobals + 0x58) == (byte *)0x0) {
return;
}
}
pbVar6 = pbVar2;
if ((*pbVar6 & 2) != 0) {
return;
}
LAB_006c9e86:
piVar3 = *(int **)(pbVar6 + 0xc);
if (((piVar3 != (int *)0x0) && (iVar7 = (**(code **)(*piVar3 + 0x18))(piVar3), iVar7 != 0)) &&
(pCVar5 = (CBaseAnimating *)
__dynamic_cast(iVar7,&CBaseEntity::typeinfo,&CBaseAnimating::typeinfo,0),
pCVar5 != (CBaseAnimating *)0x0)) {
CBaseAnimating::DrawServerHitboxes(pCVar5,0.0,false);
return;
}
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.