CDirectorSurvivalMode::OnGameplayStart
0x008beb00 · 313 bytes · __thiscall
_ZN21CDirectorSurvivalMode15OnGameplayStartEv
Decompiled
undefined (1 param)
/* CDirectorSurvivalMode::OnGameplayStart() */
void __thiscall CDirectorSurvivalMode::OnGameplayStart(CDirectorSurvivalMode *this)
{
CDirectorSurvivalMode *pCVar1;
float fVar2;
float fVar3;
longdouble lVar4;
pCVar1 = this + 0x44;
if (*(float *)(this + 0x4c) != -1.0) {
(**(code **)(*(int *)(this + 0x44) + 4))(pCVar1,this + 0x4c);
*(undefined4 *)(this + 0x4c) = 0xbf800000;
}
this[2] = (CDirectorSurvivalMode)0x0;
lVar4 = (longdouble)
CDirector::GetScriptValue
(TheDirector,"SurvivalSetupTime",
*(float *)(DirectorPrivate_DirectorSurvivalSetupTime._28_4_ + 0x2c));
fVar3 = (float)lVar4;
if (0.0 < fVar3) {
lVar4 = (longdouble)CountdownTimer::Now();
if ((float)lVar4 + fVar3 == *(float *)(this + 0x4c)) {
fVar2 = *(float *)(this + 0x48);
}
else {
(**(code **)(*(int *)(this + 0x44) + 4))(pCVar1,this + 0x4c);
fVar2 = *(float *)(this + 0x48);
*(float *)(this + 0x4c) = (float)lVar4 + fVar3;
}
if (fVar3 != fVar2) {
(**(code **)(*(int *)(this + 0x44) + 4))(pCVar1,this + 0x48);
*(float *)(this + 0x48) = fVar3;
}
*(int *)(this + 0x9c) =
((int)((int)ROUND(fVar3) - (uint)(fVar3 < (float)(int)ROUND(fVar3))) / 10) * 10;
}
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.