CDirectorVersusMode::OnRoundStartNonVirtual
0x008c3790 · 285 bytes · __thiscall
_ZN19CDirectorVersusMode22OnRoundStartNonVirtualEv
Decompiled
undefined (1 param)
/* CDirectorVersusMode::OnRoundStartNonVirtual() */
void __thiscall CDirectorVersusMode::OnRoundStartNonVirtual(CDirectorVersusMode *this)
{
undefined4 uVar1;
char cVar2;
CTerrorPlayer *this_00;
int iVar3;
longdouble lVar4;
cVar2 = CTerrorGameRules::HasPlayerControlledZombies();
if (cVar2 != '\0') {
iVar3 = 1;
if (0 < *(int *)(gpGlobals + 0x14)) {
do {
this_00 = (CTerrorPlayer *)UTIL_PlayerByIndex(iVar3);
if ((this_00 != (CTerrorPlayer *)0x0) &&
(cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar2 != '\0')) {
CTerrorPlayer::ResetSurvivorDamage(this_00);
}
iVar3 = iVar3 + 1;
} while (iVar3 <= *(int *)(gpGlobals + 0x14));
}
cVar2 = CTerrorGameRules::IsVersusMode();
if (cVar2 != '\0') {
this[4] = (CDirectorVersusMode)0x1;
}
CTerrorGameRules::SetCampaignScores(g_pGameRules,*(int *)(this + 8),*(int *)(this + 0xc));
uVar1 = versus_marker_num._28_4_;
*(undefined4 *)(this + 0x48) = 0;
iVar3 = *(int *)(uVar1 + 0x30);
*(int *)(this + 0x4c) = iVar3;
if (0 < iVar3) {
lVar4 = (longdouble)CountdownTimer::Now();
if ((float)lVar4 + 1.0 != *(float *)(this + 0x58)) {
(**(code **)(*(int *)(this + 0x50) + 4))(this + 0x50,this + 0x58);
*(float *)(this + 0x58) = (float)lVar4 + 1.0;
}
if (*(float *)(this + 0x54) != 1.0) {
(**(code **)(*(int *)(this + 0x50) + 4))(this + 0x50,this + 0x54);
*(undefined4 *)(this + 0x54) = 0x3f800000;
return;
}
}
}
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.