CDirectorSessionManager::UpdateNewPlayers
0x008bd9d0 · 281 bytes · __thiscall
_ZN23CDirectorSessionManager16UpdateNewPlayersEv
Decompiled
undefined (1 param)
/* CDirectorSessionManager::UpdateNewPlayers() */
void __thiscall CDirectorSessionManager::UpdateNewPlayers(CDirectorSessionManager *this)
{
DirectorNewPlayerType_t *pDVar1;
uint uVar2;
char cVar3;
int iVar4;
undefined *puVar5;
if (this[0x28] == (CDirectorSessionManager)0x0) {
if ((0 < *(int *)(director_test_loop._28_4_ + 0x30)) &&
(cVar3 = (**(code **)(*engine + 8))(engine), cVar3 != '\0')) {
FillRemainingSurvivorTeamSlotsWithBots();
}
if (*(int *)(this + 0x44) != 0) {
if ((this[0x35] == (CDirectorSessionManager)0x0) && (1.0 < *(float *)(gpGlobals + 0xc))) {
this[0x35] = (CDirectorSessionManager)0x1;
CreateInfoTransitioningPlayers();
if (*(int *)(this + 0x44) == 0) {
return;
}
}
do {
pDVar1 = *(DirectorNewPlayerType_t **)(this + 0x38);
uVar2 = *(uint *)pDVar1;
if ((((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) &&
((*(CBaseEntity **)(puVar5 + 4) != (CBaseEntity *)0x0 &&
(iVar4 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)(puVar5 + 4)), iVar4 < 1)))) {
CDirector::JoinNewPlayer(TheDirector,pDVar1);
cVar3 = CDirector::NoSurvivorBots(TheDirector);
if (cVar3 == '\0') {
FillRemainingSurvivorTeamSlotsWithBots();
}
}
iVar4 = *(int *)(this + 0x44) + -1;
if (0 < iVar4) {
_V_memmove(*(void **)(this + 0x38),(void *)((int)*(void **)(this + 0x38) + 8),iVar4 * 8);
iVar4 = *(int *)(this + 0x44) + -1;
}
*(int *)(this + 0x44) = iVar4;
} while (iVar4 != 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.