CTerrorGameRules::ClearTeamScores
0x00507b20 · 744 bytes · __thiscall
_ZN16CTerrorGameRules15ClearTeamScoresEb
Decompiled
undefined (2 params)
/* CTerrorGameRules::ClearTeamScores(bool) */
void __thiscall CTerrorGameRules::ClearTeamScores(CTerrorGameRules *this,bool param_1)
{
CTerrorGameRules *pCVar1;
int iVar2;
int iVar3;
undefined4 local_20 [4];
iVar3 = 2;
pCVar1 = this + 0x38c;
do {
local_20[0] = 0;
iVar2 = memcmp(pCVar1,local_20,4);
if (iVar2 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)pCVar1 = 0;
}
local_20[0] = 0;
iVar2 = memcmp(pCVar1 + 0x50,local_20,4);
if (iVar2 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(pCVar1 + 0x50) = 0;
}
local_20[0] = 0;
iVar2 = memcmp(pCVar1 + 0x10,local_20,4);
if (iVar2 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(pCVar1 + 0x10) = 0;
}
local_20[0] = 0;
iVar2 = memcmp(pCVar1 + 0x18,local_20,4);
if (iVar2 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(pCVar1 + 0x18) = 0;
}
local_20[0] = 0;
iVar2 = memcmp(pCVar1 + 0xa0,local_20,4);
if (iVar2 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(pCVar1 + 0xa0) = 0;
}
local_20[0] = 0;
iVar2 = memcmp(pCVar1 + 0xa8,local_20,4);
if (iVar2 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(pCVar1 + 0xa8) = 0;
}
pCVar1 = pCVar1 + 4;
iVar3 = iVar3 + -1;
} while (iVar3 != 0);
if (param_1) {
local_20[0] = 0;
iVar3 = memcmp(this + 0x394,local_20,4);
if (iVar3 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + 0x394) = 0;
}
local_20[0] = 0;
iVar3 = memcmp(this + 0x398,local_20,4);
if (iVar3 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + 0x398) = 0;
}
}
*(undefined4 *)(this + 0x428) = 0;
if (*(int *)(this + 0x43c) != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + 0x43c) = 0;
}
if (*(float *)(this + 0x46c) != 0.0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + 0x46c) = 0;
}
pCVar1 = this + 0x3e4;
iVar3 = 8;
do {
local_20[0] = 0;
iVar2 = memcmp(pCVar1,local_20,4);
if (iVar2 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)pCVar1 = 0;
}
local_20[0] = 0xffffffff;
iVar2 = memcmp(pCVar1 + 0x20,local_20,4);
if (iVar2 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(pCVar1 + 0x20) = 0xffffffff;
}
pCVar1 = pCVar1 + 4;
iVar3 = iVar3 + -1;
} while (iVar3 != 0);
this[0x424] = (CTerrorGameRules)0x0;
this[0x425] = (CTerrorGameRules)0x0;
this[0x426] = (CTerrorGameRules)0x0;
this[0x427] = (CTerrorGameRules)0x0;
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.