CDirector::OnRoundStart
0x008770c0 · 701 bytes · __thiscall
_ZN9CDirector12OnRoundStartEv
Decompiled
undefined (1 param)
/* CDirector::OnRoundStart() */
void __thiscall CDirector::OnRoundStart(CDirector *this)
{
float fVar1;
float fVar2;
char cVar3;
int iVar4;
CDirector *pCVar5;
longdouble lVar6;
CDirector *pCVar7;
cVar3 = CTerrorGameRules::IsScavengeMode();
if ((cVar3 != '\0') && (this[0x4e5] == (CDirector)0x0)) {
CTerrorGameRules::IncrementRoundNumber(g_pGameRules);
}
(**(code **)(*(int *)this + 0x14))(this);
if ((this[0x28c] == (CDirector)0x0) || (m_isScenarioRestart != '\0')) {
*(int *)(this + 0x418) = *(int *)(this + 0x418) + 1;
*(undefined4 *)(this + 0x440) = 0;
}
RespawnPlayers();
ResetResponseRulesOnRoundStart();
lVar6 = (longdouble)RandomFloat(0xc1f00000,0x41f00000);
fVar2 = (float)lVar6;
if (fVar2 <= 0.0) {
*(undefined4 *)(this + 0x194) = 0;
if (*(float *)(this + 0x1a0) != -1.0) {
(**(code **)(*(int *)(this + 0x198) + 4))(this + 0x198,this + 0x1a0);
*(undefined4 *)(this + 0x1a0) = 0xbf800000;
}
}
else {
*(undefined4 *)(this + 0x194) = 3;
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + fVar2 == *(float *)(this + 0x1a0)) {
fVar1 = *(float *)(this + 0x19c);
}
else {
(**(code **)(*(int *)(this + 0x198) + 4))(this + 0x198,this + 0x1a0);
fVar1 = *(float *)(this + 0x19c);
*(float *)(this + 0x1a0) = (float)lVar6 + fVar2;
}
if (fVar2 != fVar1) {
(**(code **)(*(int *)(this + 0x198) + 4))(this + 0x198,this + 0x19c);
*(float *)(this + 0x19c) = fVar2;
}
}
*(undefined4 *)(this + 0x1c0) = 0;
*(undefined4 *)(this + 0x1c8) = 0;
*(undefined4 *)(this + 0x1cc) = 0;
pCVar7 = (CDirector *)0x447a0000;
ConVar::SetValue(2.2760585e-38);
iVar4 = 0;
pCVar5 = this + 0x2f4;
do {
while (*(float *)(this + (int)(pCVar5 + (8 - (int)this))) != -1.0) {
pCVar7 = pCVar5 + 8;
iVar4 = iVar4 + 1;
(**(code **)(*(int *)pCVar5 + 4))(pCVar5,pCVar7);
*(undefined4 *)(this + (int)(pCVar5 + (8 - (int)this))) = 0xbf800000;
pCVar5 = pCVar5 + 0xc;
if (iVar4 == 6) goto LAB_00877235;
}
iVar4 = iVar4 + 1;
pCVar5 = pCVar5 + 0xc;
} while (iVar4 != 6);
LAB_00877235:
(**(code **)(**(int **)(this + 0x630) + 4))(*(int **)(this + 0x630),pCVar7);
CDirectorChallengeMode::OnRoundStartNonVirtual();
CDirectorScriptedEventManager::OnRoundStartNonVirtual
(*(CDirectorScriptedEventManager **)(this + 0x638));
CDirectorVersusMode::OnRoundStartNonVirtual(*(CDirectorVersusMode **)(this + 0x63c));
CTerrorPlayer::OnRoundStart();
if ((char)(*(int **)(this + 0x634))[10] != '\0') {
return;
}
/* WARNING: Could not recover jumptable at 0x00877347. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(int **)(this + 0x634) + 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.