CDirectorSessionManager::Reset
0x008bd670 · 439 bytes · __thiscall
_ZN23CDirectorSessionManager5ResetEv
Decompiled
undefined (1 param)
/* CDirectorSessionManager::Reset() */
void __thiscall CDirectorSessionManager::Reset(CDirectorSessionManager *this)
{
undefined4 uVar1;
char cVar2;
char *pcVar3;
char *pcVar4;
this[0x34] = (CDirectorSessionManager)0x1;
if (*(float *)(this + 0x24) != -1.0) {
(**(code **)(*(int *)(this + 0x1c) + 4))(this + 0x1c,this + 0x24);
*(undefined4 *)(this + 0x24) = 0xbf800000;
}
if ((((*(int *)(DirectorMinStartPlayers._28_4_ + 0x30) < 1) ||
(cVar2 = CDirector::IsBackgroundMap(), cVar2 != '\0')) ||
((cVar2 = CDirector::IsMissionStartMap(TheDirector), cVar2 == '\0' &&
((cVar2 = CDirector::IsTransitioned(TheDirector), cVar2 != '\0' &&
(cVar2 = CTerrorGameRules::IsScavengeMode(), cVar2 == '\0')))))) ||
(*(int *)(this + 0x10) != 0)) {
this[0x28] = (CDirectorSessionManager)0x0;
pcVar3 = "is NOT frozen";
}
else {
this[0x28] = (CDirectorSessionManager)0x1;
pcVar3 = "is frozen";
}
DevMsg("[INTROS] Team %s\n",pcVar3);
if (this[0x28] == (CDirectorSessionManager)0x0) {
pcVar4 = *(char **)(DirectorMinStartPlayers._28_4_ + 0x30);
if ((int)pcVar4 < 1) {
DevMsg("[INTROS] Min start players is %d\n",pcVar4);
pcVar3 = pcVar4;
}
if (*(int *)(this + 0x10) != 0) {
DevMsg("[INTROS] Players already connected, we\'re restarting on the same map\n",pcVar3);
}
cVar2 = CDirector::IsBackgroundMap();
if (cVar2 != '\0') {
DevMsg("[INTROS] It\'s the background map\n",pcVar3);
}
cVar2 = CDirector::IsTransitioned(TheDirector);
if ((cVar2 != '\0') && (cVar2 = CDirector::IsMissionStartMap(TheDirector), cVar2 == '\0')) {
DevMsg("[INTROS] We\'ve transitioned and this isn\'t the mission start map\n");
}
}
uVar1 = DirectorReadyDuration._28_4_;
*(undefined4 *)(this + 0x2c) = 0;
*(undefined4 *)(this + 0x30) = 0;
if (*(float *)(uVar1 + 0x2c) <= 0.0) {
this[0x18] = (CDirectorSessionManager)((byte)this[0x28] ^ 1);
return;
}
this[0x18] = (CDirectorSessionManager)0x0;
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.