CTerrorGameRules::ResetScriptedHUD
0x00508e50 · 1040 bytes · __thiscall
_ZN16CTerrorGameRules16ResetScriptedHUDEv
Decompiled
undefined (1 param)
/* CTerrorGameRules::ResetScriptedHUD() */
void __thiscall CTerrorGameRules::ResetScriptedHUD(CTerrorGameRules *this)
{
int iVar1;
CTerrorGameRules *pCVar2;
int iVar3;
char *pcVar4;
int in_GS_OFFSET;
byte bVar5;
CTerrorGameRules *local_d4;
CTerrorGameRules *local_d0;
undefined4 local_c8;
undefined4 local_c4;
undefined4 local_c0;
undefined4 local_bc;
undefined4 local_b8;
undefined4 local_b4;
undefined4 local_b0;
undefined4 local_ac;
undefined4 local_a8;
undefined4 local_a4;
char local_a0 [128];
int local_20;
bVar5 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (*(float *)(this + 0x49c) != 0.0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + 0x49c) = 0;
}
iVar3 = 0;
local_d4 = this + 0x674;
local_d0 = local_d4;
do {
local_c8 = 0;
iVar1 = memcmp(this + iVar3 + 0x4a0,&local_c8,4);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + iVar3 + 0x4a0) = 0;
}
local_c4 = 0;
iVar1 = memcmp(this + iVar3 + 0x4dc,&local_c4,4);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + iVar3 + 0x4dc) = 0;
}
local_c0 = 0;
iVar1 = memcmp(this + iVar3 + 0x518,&local_c0,4);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + iVar3 + 0x518) = 0;
}
local_bc = 0;
iVar1 = memcmp(this + iVar3 + 0x554,&local_bc,4);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + iVar3 + 0x554) = 0;
}
local_b8 = 0;
iVar1 = memcmp(this + iVar3 + 0x590,&local_b8,4);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + iVar3 + 0x590) = 0;
}
local_b4 = 0;
iVar1 = memcmp(this + iVar3 + 0x5cc,&local_b4,4);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + iVar3 + 0x5cc) = 0;
}
local_b0 = 0;
iVar1 = memcmp(this + iVar3 + 0x608,&local_b0,4);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + iVar3 + 0x608) = 0;
}
V_strncpy(local_a0,"",0x80);
iVar1 = memcmp(local_d0,local_a0,0x80);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
pcVar4 = local_a0;
pCVar2 = local_d4;
for (iVar1 = 0x20; iVar1 != 0; iVar1 = iVar1 + -1) {
*(undefined4 *)pCVar2 = *(undefined4 *)pcVar4;
pcVar4 = pcVar4 + ((uint)bVar5 * -2 + 1) * 4;
pCVar2 = pCVar2 + (uint)bVar5 * -8 + 4;
}
}
local_d4 = local_d4 + 0x80;
iVar3 = iVar3 + 4;
local_d0 = local_d0 + 0x80;
} while (iVar3 != 0x3c);
pCVar2 = this + 0x644;
iVar3 = 0;
do {
local_a4 = 0;
iVar1 = memcmp(pCVar2,&local_a4,4);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)pCVar2 = 0;
}
local_ac = 0;
iVar1 = memcmp(pCVar2 + 0x10,&local_ac,4);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(pCVar2 + 0x10) = 0;
}
local_a8 = 0;
iVar1 = memcmp(pCVar2 + 0x20,&local_a8,4);
if (iVar1 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(pCVar2 + 0x20) = 0;
}
iVar1 = iVar3 + 1;
pCVar2 = pCVar2 + 4;
SetScriptedHUDTimerReset(this,iVar3);
iVar3 = iVar1;
} while (iVar1 != 4);
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* 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.