CDirectorSessionManager::UpdateDisconnectedPlayers
0x008be000 · 300 bytes · __thiscall
_ZN23CDirectorSessionManager25UpdateDisconnectedPlayersEv
Decompiled
undefined (1 param)
/* CDirectorSessionManager::UpdateDisconnectedPlayers() */
void __thiscall CDirectorSessionManager::UpdateDisconnectedPlayers(CDirectorSessionManager *this)
{
char cVar1;
int iVar2;
uint uVar3;
int iVar4;
NextBotDestroyer local_44 [4];
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
int local_24;
undefined4 local_20;
if ((this[0x36] != (CDirectorSessionManager)0x0) && (TheDirector[0x28c] == (CDirector)0x0)) {
this[0x36] = (CDirectorSessionManager)0x0;
cVar1 = CDirector::IsAllBotGame();
if (cVar1 == '\0') {
local_30 = 0;
local_2c = 0;
local_28 = 0;
local_24 = 0;
local_20 = 0;
local_40 = 0xffffffff;
local_3c = 7;
local_38 = 1;
local_34 = 9;
/* try { // try from 008be085 to 008be134 has its CatchHandler @ 008be137 */
ForEachTerrorPlayer<PlayerCollector>((PlayerCollector *)&local_40);
if (local_24 == 0) {
NextBotDestroyer::NextBotDestroyer(local_44,-1);
iVar2 = TheNextBots();
uVar3 = (uint)*(ushort *)(iVar2 + 0x10);
if (uVar3 != 0xffff) {
iVar4 = *(int *)(iVar2 + 4);
do {
cVar1 = NextBotDestroyer::operator()(local_44,*(INextBot **)(iVar4 + uVar3 * 8));
if (cVar1 == '\0') break;
iVar4 = *(int *)(iVar2 + 4);
uVar3 = (uint)*(ushort *)(iVar4 + 6 + uVar3 * 8);
} while (uVar3 != 0xffff);
}
cVar1 = (**(code **)(*engine + 8))(engine);
if (cVar1 != '\0') {
CDirector::FullRestart(TheDirector);
}
}
local_24 = 0;
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_30);
local_20 = local_30;
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_30);
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.