CDirectorScriptedEventManager::UpdateClearNWaitStage
0x008b94a0 · 408 bytes · __thiscall
_ZN29CDirectorScriptedEventManager21UpdateClearNWaitStageEv
Decompiled
undefined (1 param)
/* CDirectorScriptedEventManager::UpdateClearNWaitStage() */
void __thiscall
CDirectorScriptedEventManager::UpdateClearNWaitStage(CDirectorScriptedEventManager *this)
{
int iVar1;
int iVar2;
int iVar3;
longdouble lVar4;
float fVar5;
undefined4 local_28;
undefined1 local_24;
int local_20;
iVar3 = CDirectorTacticalServices::GetCommonInfectedCount
(*(CDirectorTacticalServices **)(TheDirector + 0x628),0);
local_28 = 3;
local_24 = 1;
local_20 = 0;
ForEachPlayer<LivePlayerCounter>((LivePlayerCounter *)&local_28);
iVar2 = local_20;
if (((*(float *)(this + 0xcc) <= 0.0) || (iVar3 != *(int *)(this + 0xd0))) ||
(local_20 != *(int *)(this + 0xe0))) {
Msg("SCRIPTED_MODE: Old Clearout Stage Timer reset to %d seconds.\n",
*(undefined4 *)(this + 0xec));
fVar5 = (float)*(int *)(this + 0xec);
lVar4 = (longdouble)CountdownTimer::Now();
if ((float)lVar4 + fVar5 != *(float *)(this + 0xcc)) {
(**(code **)(*(int *)(this + 0xc4) + 4))(this + 0xc4,this + 0xcc);
*(float *)(this + 0xcc) = (float)lVar4 + fVar5;
}
if (fVar5 != *(float *)(this + 200)) {
(**(code **)(*(int *)(this + 0xc4) + 4))(this + 0xc4,this + 200);
*(float *)(this + 200) = fVar5;
}
}
iVar1 = TheDirector;
*(int *)(this + 0xd0) = iVar3;
*(int *)(this + 0xe0) = iVar2;
if ((*(int *)(iVar1 + 0x1c0) == 0 && *(int *)(iVar1 + 0x1bc) == 0) &&
(((iVar3 <= *(int *)(DirectorPrivate_DirectorFinaleClearCount._28_4_ + 0x30) && (iVar2 == 0))
|| ((lVar4 = (longdouble)CountdownTimer::Now(), *(float *)(this + 0xcc) <= (float)lVar4 &&
((iVar3 < 0xb && (iVar2 < 2)))))))) {
IncrementCustomFinaleStage(this);
}
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.