CDirectorSessionManager::UpdateTeamReadiness
0x008bd1f0 · 884 bytes · __thiscall
_ZN23CDirectorSessionManager19UpdateTeamReadinessEv
Decompiled
undefined (1 param)
/* CDirectorSessionManager::UpdateTeamReadiness() */
void __thiscall CDirectorSessionManager::UpdateTeamReadiness(CDirectorSessionManager *this)
{
float fVar1;
char cVar2;
int iVar3;
longdouble lVar4;
int local_24;
int local_20 [4];
cVar2 = CDirector::IsPlayingIntro(TheDirector);
if (cVar2 != '\0') {
return;
}
cVar2 = CDirectorScavengeMode::ShouldUpdateTeamReadiness
(*(CDirectorScavengeMode **)(TheDirector + 0x644));
if (cVar2 == '\0') {
return;
}
if (this[0x18] != (CDirectorSessionManager)0x0) {
return;
}
if ((*(float *)(this + 0x24) <= 0.0) || (this[0x28] != (CDirectorSessionManager)0x0)) {
cVar2 = CDirector::IsAllBotGame();
if (cVar2 == '\0') {
iVar3 = UTIL_HumansOnTeam(2,false);
if ((iVar3 == 0) && (iVar3 = UTIL_HumansOnTeam(3,false), iVar3 == 0)) {
return;
}
iVar3 = CDirector::GetActivePlayerCount(TheDirector,2,1);
if (iVar3 != 4) {
fVar1 = *(float *)(DirectorReadyDuration._28_4_ + 0x2c);
lVar4 = (longdouble)CountdownTimer::Now();
if ((float)lVar4 + fVar1 != *(float *)(this + 0x24)) {
(**(code **)(*(int *)(this + 0x1c) + 4))(this + 0x1c,this + 0x24);
*(float *)(this + 0x24) = (float)lVar4 + fVar1;
}
if (fVar1 == *(float *)(this + 0x20)) {
return;
}
(**(code **)(*(int *)(this + 0x1c) + 4))(this + 0x1c,this + 0x20);
*(float *)(this + 0x20) = fVar1;
return;
}
lVar4 = (longdouble)CountdownTimer::Now();
if ((float)lVar4 != *(float *)(this + 0x24)) {
(**(code **)(*(int *)(this + 0x1c) + 4))(this + 0x1c,this + 0x24);
*(float *)(this + 0x24) = (float)lVar4;
}
if (*(float *)(this + 0x20) == 0.0) {
return;
}
iVar3 = *(int *)(this + 0x1c);
goto LAB_008bd319;
}
lVar4 = (longdouble)CountdownTimer::Now();
if ((float)lVar4 != *(float *)(this + 0x24)) {
(**(code **)(*(int *)(this + 0x1c) + 4))(this + 0x1c,this + 0x24);
*(float *)(this + 0x24) = (float)lVar4;
}
fVar1 = *(float *)(this + 0x20);
}
else {
lVar4 = (longdouble)CountdownTimer::Now();
if ((((*(float *)(this + 0x24) <= (float)lVar4) || (*(int *)(nav_edit._28_4_ + 0x30) != 0)) ||
(*(int *)(DirectorReadyDuration._28_4_ + 0x30) == 0)) ||
(cVar2 = CDirector::IsMissionStartMap(TheDirector), cVar2 != '\0')) {
this[0x18] = (CDirectorSessionManager)0x1;
(**(code **)(*(int *)TheDirector + 0x54))(TheDirector);
return;
}
TransitionedPlayerCount(&local_24,local_20,2);
if (local_24 < local_20[0]) {
return;
}
cVar2 = CTerrorGameRules::HasPlayerControlledZombies();
if (cVar2 != '\0') {
TransitionedPlayerCount(&local_24,local_20,3);
if (local_24 < 1) {
return;
}
if (local_24 < local_20[0]) {
return;
}
}
lVar4 = (longdouble)CountdownTimer::Now();
if ((float)lVar4 != *(float *)(this + 0x24)) {
(**(code **)(*(int *)(this + 0x1c) + 4))(this + 0x1c,this + 0x24);
*(float *)(this + 0x24) = (float)lVar4;
}
fVar1 = *(float *)(this + 0x20);
}
if (fVar1 == 0.0) {
return;
}
iVar3 = *(int *)(this + 0x1c);
LAB_008bd319:
(**(code **)(iVar3 + 4))(this + 0x1c,this + 0x20);
*(undefined4 *)(this + 0x20) = 0;
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.