CDirector::ShouldAllowSpecialSpawns
0x0087ac10 · 319 bytes · __thiscall
_ZN9CDirector24ShouldAllowSpecialSpawnsEv
Decompiled
undefined (1 param)
/* CDirector::ShouldAllowSpecialSpawns() */
bool __thiscall CDirector::ShouldAllowSpecialSpawns(CDirector *this)
{
int *piVar1;
char cVar2;
bool bVar3;
int iVar4;
CDirectorScriptedEventManager *this_00;
CDirectorSurvivalMode *this_01;
SurvivorsInFinaleScan local_e;
undefined1 local_d;
this_01 = *(CDirectorSurvivalMode **)(this + 0x640);
iVar4 = CDirectorSurvivalMode::ShouldAllowSpecialSpawnsNonVirtual(this_01);
if (iVar4 == 2) {
this_01 = *(CDirectorSurvivalMode **)(this + 0x648);
iVar4 = CDirectorChallengeMode::ShouldAllowSpecialSpawnsNonVirtual();
}
if (iVar4 == 1) {
return true;
}
if (iVar4 == 0) {
return false;
}
cVar2 = CTerrorGameRules::HasPlayerControlledZombies();
if (cVar2 != '\0') {
return true;
}
bVar3 = false;
if ((*(int *)(this + 0x1c0) < 1) ||
(cVar2 = IsAnySurvivorBypassingTank((CDirector *)this_01), cVar2 == '\0')) {
this_00 = *(CDirectorScriptedEventManager **)(this + 0x638);
if ((*(int *)this_00 == 1) && (*(int *)(this_00 + 4) == 0x11)) goto LAB_0087ac7a;
iVar4 = GetScriptValue(this,"ShouldAllowSpecialsWithTank",0);
if (iVar4 == 0) {
if (*(int *)(this + 0x194) - 2U < 2) {
return false;
}
if (0 < *(int *)(this + 0x1c0)) {
return false;
}
}
}
this_00 = *(CDirectorScriptedEventManager **)(this + 0x638);
LAB_0087ac7a:
cVar2 = CDirectorScriptedEventManager::AreAllSurvivorsInBattlefield(this_00);
if ((((cVar2 == '\0') || (piVar1 = *(int **)(this + 0x638), piVar1[0x4a] != 4)) ||
(piVar1[1] == 9)) || (*piVar1 == 1)) {
local_e = (SurvivorsInFinaleScan)0x1;
local_d = 1;
bVar3 = ForEachTerrorPlayer<SurvivorsInFinaleScan>(&local_e);
if (!bVar3) {
return true;
}
bVar3 = **(int **)(this + 0x638) != 5;
}
return bVar3;
}
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.