CDirectorScavengeMode::ScavengeUpdateScenarioState
0x008b34b0 · 286 bytes · __thiscall
_ZN21CDirectorScavengeMode27ScavengeUpdateScenarioStateEv
Decompiled
undefined (1 param)
/* CDirectorScavengeMode::ScavengeUpdateScenarioState() */
void __thiscall CDirectorScavengeMode::ScavengeUpdateScenarioState(CDirectorScavengeMode *this)
{
char cVar1;
int iVar2;
int iVar3;
longdouble lVar4;
ScavengeApproachingRoundWin local_1d [13];
cVar1 = CTerrorGameRules::IsScavengeMode();
if ((cVar1 != '\0') && (this[8] != (CDirectorScavengeMode)0x0)) {
UpdateMusicIntensity(this);
if (this[0xb] == (CDirectorScavengeMode)0x0) {
cVar1 = '\0';
lVar4 = (longdouble)CTerrorGameRules::GetRemainingAccumulatedTime(g_pGameRules);
if ((float)lVar4 <= 0.0) {
cVar1 = OnRoundTimeExpired(this);
}
}
else {
cVar1 = UpdateOvertimeState(this);
}
iVar2 = CTerrorGameRules::GetScavengeTeamScore(g_pGameRules,2,-1);
iVar3 = CTerrorGameRules::GetScavengeTeamScore(g_pGameRules,3,-1);
if (((*(int *)(TheDirector + 0x3a0) < 1) && (iVar3 != 0 || iVar2 != 0)) || (cVar1 != '\0')) {
LAB_008b35b6:
CDirector::InitiateEndScenario(TheDirector);
return;
}
if (TheDirector[0x4e5] != (CDirector)0x0) {
if (iVar3 < iVar2) goto LAB_008b35b6;
if ((iVar3 == 0) || (iVar2 != iVar3)) {
this[9] = (CDirectorScavengeMode)0x0;
}
else if (this[9] == (CDirectorScavengeMode)0x0) {
this[9] = (CDirectorScavengeMode)0x1;
ForEachTerrorPlayer<ScavengeApproachingRoundWin>(local_1d);
}
}
}
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.