CTerrorGameRules::StoreSacrificeEscapees
0x00509360 · 376 bytes · __thiscall
_ZN16CTerrorGameRules22StoreSacrificeEscapeesEv
Decompiled
undefined (1 param)
/* CTerrorGameRules::StoreSacrificeEscapees() */
void __thiscall CTerrorGameRules::StoreSacrificeEscapees(CTerrorGameRules *this)
{
char cVar1;
CBaseEntity *this_00;
int iVar2;
undefined4 uVar3;
uint uVar4;
undefined *puVar5;
uint uVar6;
uint uVar7;
if (*(int *)(this + 0x498) != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + 0x498) = 0;
}
iVar2 = gpGlobals;
this[0x424] = (CTerrorGameRules)0x0;
this[0x425] = (CTerrorGameRules)0x0;
this[0x426] = (CTerrorGameRules)0x0;
this[0x427] = (CTerrorGameRules)0x0;
uVar7 = 1;
if (*(int *)(iVar2 + 0x14) != 0) {
do {
while ((((((this_00 = (CBaseEntity *)UTIL_EntityByIndex(uVar7), this_00 == (CBaseEntity *)0x0
|| (cVar1 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar1 == '\0')) ||
(cVar1 = (**(code **)(*(int *)this_00 + 300))(this_00), cVar1 == '\0')) ||
((iVar2 = CBaseEntity::GetTeamNumber(this_00), iVar2 != 2 ||
(uVar4 = *(uint *)(this_00 + 0x33a4), uVar4 == 0xffffffff)))) ||
((puVar5 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc
|| ((*(uint *)(puVar5 + 8) != uVar4 >> 0xc ||
(*(CBaseEntity **)(puVar5 + 4) == (CBaseEntity *)0x0)))))) ||
(this_00 == *(CBaseEntity **)(puVar5 + 4)))) {
uVar7 = uVar7 + 1;
if (*(uint *)(gpGlobals + 0x14) < uVar7) {
return;
}
}
uVar6 = 1 << ((byte)uVar7 & 0x1f);
uVar4 = uVar6 | *(uint *)(this + 0x498);
if (*(uint *)(this + 0x498) != uVar4) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(uint *)(this + 0x498) = uVar4;
}
if (*(uint *)(this_00 + 0x2ba0) < 4) {
this[*(uint *)(this_00 + 0x2ba0) + 0x424] = (CTerrorGameRules)0x1;
}
uVar3 = CBaseEntity::GetDebugName(this_00);
uVar4 = uVar7 + 1;
DevMsg("*!* [%u] Sacrifice Escapee %s [%d]<%u> \n",*(undefined4 *)(gpGlobals + 4),uVar3,uVar7,
uVar6);
uVar7 = uVar4;
} while (uVar4 <= *(uint *)(gpGlobals + 0x14));
}
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.