CDirectorScavengeMode::ShouldUpdateTeamReadiness
0x008b38f0 · 254 bytes · __thiscall
_ZN21CDirectorScavengeMode25ShouldUpdateTeamReadinessEv
Decompiled
undefined (1 param)
/* CDirectorScavengeMode::ShouldUpdateTeamReadiness() */
undefined4 __thiscall CDirectorScavengeMode::ShouldUpdateTeamReadiness(CDirectorScavengeMode *this)
{
char cVar1;
longdouble lVar2;
CShowViewportPanel *this_00;
undefined4 local_1c;
char *local_18;
undefined1 local_14;
undefined4 local_10;
cVar1 = CTerrorGameRules::IsScavengeMode();
if ((cVar1 != '\0') && (0.0 < *(float *)(this + 0x18))) {
lVar2 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x18) <= (float)lVar2) {
if (*(float *)(this + 0x18) != -1.0) {
(**(code **)(*(int *)(this + 0x10) + 4))(this + 0x10,this + 0x18);
*(undefined4 *)(this + 0x18) = 0xbf800000;
}
CDirectorSessionManager::BeginTeamReadyCountdown(*(float *)(TheDirector + 0x634));
cVar1 = CDirector::HasAnySurvivorLeftSafeArea(TheDirector);
if (cVar1 == '\0') {
CDirector::OnFirstSurvivorLeftSafeArea(TheDirector,(CTerrorPlayer *)0x0);
}
this_00 = (CShowViewportPanel *)&local_1c;
local_1c = 0xffffffff;
local_18 = "ready_countdown";
local_14 = 0;
local_10 = 0;
ForEachTerrorPlayer<CShowViewportPanel>(this_00);
if (this[8] != (CDirectorScavengeMode)0x0) {
return 0;
}
OnScavengeRoundStarted((CDirectorScavengeMode *)this_00);
return 0;
}
}
return 1;
}
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.