CDirectorScriptedEventManager::UpdateScriptedEventStage
0x008b96e0 · 6127 bytes · __thiscall
_ZN29CDirectorScriptedEventManager24UpdateScriptedEventStageEv
Decompiled
undefined (1 param)
/* CDirectorScriptedEventManager::UpdateScriptedEventStage() */
CDirectorScriptedEventManager __thiscall
CDirectorScriptedEventManager::UpdateScriptedEventStage(CDirectorScriptedEventManager *this)
{
CDirector *pCVar1;
CDirectorScriptedEventManager *pCVar2;
CDirector *pCVar3;
char cVar4;
CDirectorScriptedEventManager CVar5;
int iVar6;
CBaseEntity *pCVar7;
longdouble lVar8;
longdouble lVar9;
float fVar10;
float fVar11;
Vector local_34 [12];
undefined4 local_28;
float local_24;
undefined4 local_20;
iVar6 = gpGlobals;
switch(*(undefined4 *)(this + 4)) {
case 1:
if (TheDirector[0x168] == (CDirector)0x0) {
if (*(int *)(this + 0x128) != 4) {
return (CDirectorScriptedEventManager)0x1;
}
cVar4 = CDirector::IsAnySurvivorInCombat();
if (cVar4 != '\0') {
return (CDirectorScriptedEventManager)0x1;
}
}
if (0.0 < *(float *)(this + 0x98)) {
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 < *(float *)(this + 0x98)) {
return (CDirectorScriptedEventManager)0x1;
}
CVar5 = (CDirectorScriptedEventManager)
ZombieManager::GetRandomPZSpawnPosition(TheZombieManager,8,10,0,local_34);
if (CVar5 == (CDirectorScriptedEventManager)0x0) {
return (CDirectorScriptedEventManager)0x1;
}
lVar8 = (longdouble)RandomFloat(0,0x43b40000);
local_24 = (float)lVar8;
local_28 = 0;
local_20 = 0;
pCVar7 = (CBaseEntity *)
ZombieManager::SpawnTank(TheZombieManager,local_34,(QAngle *)&local_28);
if (pCVar7 == (CBaseEntity *)0x0) {
return (CDirectorScriptedEventManager)0x1;
}
CDirector::TryOfferingTankBot(TheDirector,pCVar7,true);
if (*(int *)this == 1) {
CDirector::EndLocalScript(TheDirector);
}
this[0x8b] = (CDirectorScriptedEventManager)0x1;
ChangeFinaleStage(this,2,0);
if (*(float *)(this + 0x98) != -1.0) {
CountdownTimer::NetworkVar_m_timestamp::NetworkStateChanged(this + 0x98);
*(undefined4 *)(this + 0x98) = 0xbf800000;
}
UTIL_LogPrintf("%3.2f: Director: Finale state = FINALE_HALFTIME_BOSS\n",
(double)*(float *)(gpGlobals + 0xc));
TheDirector[0x168] = (CDirector)0x0;
return CVar5;
}
goto LAB_008ba65d;
case 2:
CVar5 = this[0x8b];
if (CVar5 != (CDirectorScriptedEventManager)0x0) {
if (*(int *)(TheDirector + 0x1c0) < 1) {
return (CDirectorScriptedEventManager)0x1;
}
this[0x8b] = (CDirectorScriptedEventManager)0x0;
UTIL_LogPrintf("%3.2f: Director: Halftime Tank has spawned.\n",(double)*(float *)(iVar6 + 0xc)
);
return CVar5;
}
if (0 < *(int *)(TheDirector + 0x1c0)) {
return (CDirectorScriptedEventManager)0x1;
}
cVar4 = CDirector::IsAnySurvivorInCombat();
if (cVar4 != '\0') {
return (CDirectorScriptedEventManager)0x1;
}
if (0.0 < *(float *)(this + 0x98)) {
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 < *(float *)(this + 0x98)) {
return (CDirectorScriptedEventManager)0x1;
}
ChangeFinaleStage(this,(*(int *)this != 1) + '\x03');
StartPanicEvent(this,(*(int *)this != 1) + 1,(CBasePlayer *)0x0);
if (*(int *)this == 1) {
CDirector::BeginLocalScript(TheDirector,"director_gauntlet");
}
if (*(float *)(this + 0x98) != -1.0) {
CountdownTimer::NetworkVar_m_timestamp::NetworkStateChanged(this + 0x98);
*(undefined4 *)(this + 0x98) = 0xbf800000;
}
UTIL_LogPrintf("%3.2f: Director: Finale state = FINALE_HORDE_ATTACK_2\n",
(double)*(float *)(gpGlobals + 0xc));
return (CDirectorScriptedEventManager)0x1;
}
fVar10 = *(float *)(DirectorFinaleStageDelay._28_4_ + 0x2c);
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar10 != *(float *)(this + 0x98)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x98);
*(float *)(this + 0x98) = (float)lVar8 + fVar10;
}
if (fVar10 != *(float *)(this + 0x94)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x94);
*(float *)(this + 0x94) = fVar10;
}
goto LAB_008ba6c9;
case 3:
if (this[0x88] == (CDirectorScriptedEventManager)0x0) {
return (CDirectorScriptedEventManager)0x1;
}
ChangeFinaleStage(this,4);
case 4:
if (*(int *)this == 1) {
ChangeFinaleStage(this,6,0);
fVar10 = *(float *)(DirectorFinaleStageDelay._28_4_ + 0x2c);
lVar8 = (longdouble)RandomFloat(fVar10,fVar10 + fVar10);
fVar10 = (float)lVar8;
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar10 != *(float *)(this + 0x98)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x98);
*(float *)(this + 0x98) = (float)lVar8 + fVar10;
}
if (fVar10 != *(float *)(this + 0x94)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x94);
*(float *)(this + 0x94) = fVar10;
return (CDirectorScriptedEventManager)0x1;
}
}
else if ((*(int *)(this + 0x128) == 4) &&
(cVar4 = CDirector::IsAnySurvivorInCombat(), cVar4 == '\0')) {
if (*(float *)(this + 0x98) <= 0.0) {
LAB_008ba65d:
fVar10 = *(float *)(DirectorFinaleStageDelay._28_4_ + 0x2c);
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar10 != *(float *)(this + 0x98)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x98);
*(float *)(this + 0x98) = (float)lVar8 + fVar10;
}
if (fVar10 != *(float *)(this + 0x94)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x94);
*(float *)(this + 0x94) = fVar10;
}
LAB_008ba6c9:
CDirector::OnFinalePause(TheDirector);
return (CDirectorScriptedEventManager)0x1;
}
lVar8 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x98) <= (float)lVar8) {
CVar5 = (CDirectorScriptedEventManager)
ZombieManager::GetRandomPZSpawnPosition(TheZombieManager,8,10,0,local_34);
if (CVar5 != (CDirectorScriptedEventManager)0x0) {
lVar8 = (longdouble)RandomFloat(0,0x43b40000);
local_24 = (float)lVar8;
local_28 = 0;
local_20 = 0;
pCVar7 = (CBaseEntity *)
ZombieManager::SpawnTank(TheZombieManager,local_34,(QAngle *)&local_28);
if (pCVar7 != (CBaseEntity *)0x0) {
if (*(int *)this == 1) {
CDirector::EndLocalScript(TheDirector);
ChangeFinaleStage(this,6,0);
return CVar5;
}
CDirector::TryOfferingTankBot(TheDirector,pCVar7,true);
this[0x8b] = (CDirectorScriptedEventManager)0x1;
ChangeFinaleStage(this,5,0);
if (*(float *)(this + 0x98) != -1.0) {
CountdownTimer::NetworkVar_m_timestamp::NetworkStateChanged(this + 0x98);
*(undefined4 *)(this + 0x98) = 0xbf800000;
}
UTIL_LogPrintf("%3.2f: Director: Finale state = FINALE_FINAL_BOSS\n",
(double)*(float *)(gpGlobals + 0xc));
return CVar5;
}
}
}
}
break;
case 5:
CVar5 = this[0x8b];
if (CVar5 == (CDirectorScriptedEventManager)0x0) {
if ((*(int *)(TheDirector + 0x1c0) < 1) &&
(cVar4 = CDirector::IsAnySurvivorInCombat(), cVar4 == '\0')) {
if (*(float *)(this + 0x98) <= 0.0) {
SendInRescueVehicle(this);
fVar10 = *(float *)(DirectorFinaleStageDelay._28_4_ + 0x2c);
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar10 != *(float *)(this + 0x98)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x98);
*(float *)(this + 0x98) = (float)lVar8 + fVar10;
}
if (fVar10 != *(float *)(this + 0x94)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x94);
*(float *)(this + 0x94) = fVar10;
}
goto LAB_008ba6c9;
}
lVar8 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x98) <= (float)lVar8) {
StartPanicEvent(this,1,(CBasePlayer *)0x0);
ChangeFinaleStage(this,6,0);
UTIL_LogPrintf("%3.2f: Director: Finale state = FINALE_HORDE_ESCAPE\n",
(double)*(float *)(gpGlobals + 0xc));
fVar10 = *(float *)(DirectorFinaleStageDelay._28_4_ + 0x2c) +
*(float *)(DirectorFinaleStageDelay._28_4_ + 0x2c);
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar10 != *(float *)(this + 0x98)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x98);
*(float *)(this + 0x98) = (float)lVar8 + fVar10;
}
if (fVar10 != *(float *)(this + 0x94)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x94);
*(float *)(this + 0x94) = fVar10;
return (CDirectorScriptedEventManager)0x1;
}
}
}
}
else if (0 < *(int *)(TheDirector + 0x1c0)) {
this[0x8b] = (CDirectorScriptedEventManager)0x0;
UTIL_LogPrintf("%3.2f: Director: Final Tank has spawned.\n",(double)*(float *)(iVar6 + 0xc));
return CVar5;
}
break;
case 6:
case 0x15:
UpdateScriptedEscapeStage(this);
return (CDirectorScriptedEventManager)0x1;
case 7:
if (*(int *)(this + 0x128) == 4) {
StartPanicEvent(this,*(int *)(this + 0xec),(CBasePlayer *)0x0);
return (CDirectorScriptedEventManager)0x1;
}
break;
case 8:
cVar4 = UpdateScriptedTankStage(this,(int *)(this + 0xec));
if (cVar4 == '\0') {
IncrementCustomFinaleStage(this);
}
iVar6 = CDirector::GetScriptValue(TheDirector,"ShouldAllowMobsWithTank",0);
return (CDirectorScriptedEventManager)(iVar6 == 0);
case 9:
if ((0 < *(int *)(this + 0x100)) && (0.0 < *(float *)(this + 0x10c))) {
lVar8 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x10c) <= (float)lVar8) {
if (*(int *)(this + 4) == 9) {
CDirector::EndLocalScript(TheDirector);
}
IncrementCustomFinaleStage(this);
if (*(float *)(this + 0x10c) != -1.0) {
(**(code **)(*(int *)(this + 0x104) + 4))(this + 0x104,this + 0x10c);
*(undefined4 *)(this + 0x10c) = 0xbf800000;
}
*(int *)(this + 0x100) = *(int *)(this + 0x100) + -1;
return (CDirectorScriptedEventManager)0x1;
}
}
return (CDirectorScriptedEventManager)0x0;
case 10:
cVar4 = UpdateScriptedDelayStage(this,*(int *)(this + 0xec));
goto joined_r0x008b9c7a;
case 0xb:
UpdateClearNWaitStage(this);
return (CDirectorScriptedEventManager)0x1;
case 0xc:
ChangeFinaleStage(this,0xd);
this[0x8a] = (CDirectorScriptedEventManager)0x0;
ForEachSurvivor<CSurvivorRecalculateActiveArea>((CSurvivorRecalculateActiveArea *)&local_28);
ZombieManager::OnFinaleStart(TheZombieManager);
iVar6 = CDirector::GetMobSize(TheDirector);
ZombieManager::SpawnMob(TheZombieManager,iVar6);
lVar8 = (longdouble)CDirector::GetMobSpawnMaxInterval(TheDirector);
lVar9 = (longdouble)CDirector::GetMobSpawnMinInterval(TheDirector);
lVar8 = (longdouble)RandomFloat((float)lVar9,(float)lVar8);
pCVar3 = TheDirector;
fVar10 = (float)lVar8;
pCVar1 = TheDirector + 0x294;
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar10 != *(float *)(pCVar3 + 0x29c)) {
(**(code **)(*(int *)(pCVar3 + 0x294) + 4))(pCVar1,pCVar3 + 0x29c);
*(float *)(pCVar3 + 0x29c) = (float)lVar8 + fVar10;
}
if (fVar10 != *(float *)(pCVar3 + 0x298)) {
(**(code **)(*(int *)(pCVar3 + 0x294) + 4))(pCVar1,pCVar3 + 0x298);
*(float *)(pCVar3 + 0x298) = fVar10;
}
break;
case 0xd:
fVar10 = *(float *)(TheDirector + 0x29c);
lVar8 = (longdouble)CountdownTimer::Now();
lVar9 = (longdouble)CDirector::GetMobSpawnMaxInterval(TheDirector);
if ((float)lVar9 < fVar10 - (float)lVar8) {
lVar8 = (longdouble)CDirector::GetMobSpawnMaxInterval(TheDirector);
lVar9 = (longdouble)CDirector::GetMobSpawnMinInterval(TheDirector);
lVar8 = (longdouble)RandomFloat((float)lVar9,(float)lVar8);
pCVar3 = TheDirector;
fVar10 = (float)lVar8;
pCVar1 = TheDirector + 0x294;
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar10 != *(float *)(pCVar3 + 0x29c)) {
(**(code **)(*(int *)(pCVar3 + 0x294) + 4))(pCVar1,pCVar3 + 0x29c);
*(float *)(pCVar3 + 0x29c) = (float)lVar8 + fVar10;
}
if (fVar10 != *(float *)(pCVar3 + 0x298)) {
(**(code **)(*(int *)(pCVar3 + 0x294) + 4))(pCVar1,pCVar3 + 0x298);
*(float *)(pCVar3 + 0x298) = fVar10;
}
}
pCVar1 = TheDirector;
lVar8 = (longdouble)CountdownTimer::Now();
if (*(float *)(pCVar1 + 0x29c) <= (float)lVar8) {
fVar10 = *(float *)(this + 0xa0);
if (0.0 < fVar10) {
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar10 != *(float *)(this + 0xb8)) {
(**(code **)(*(int *)(this + 0xb0) + 4))(this + 0xb0,this + 0xb8);
*(float *)(this + 0xb8) = (float)lVar8 + fVar10;
}
if (fVar10 != *(float *)(this + 0xb4)) {
(**(code **)(*(int *)(this + 0xb0) + 4))(this + 0xb0,this + 0xb4);
*(float *)(this + 0xb4) = fVar10;
}
}
ChangeFinaleStage(this,0xe,0);
return (CDirectorScriptedEventManager)0x1;
}
break;
case 0xe:
fVar10 = *(float *)(this + 0xb8);
if (0.0 < fVar10) {
lVar8 = (longdouble)CountdownTimer::Now();
fVar10 = *(float *)(this + 0xb8);
if ((float)lVar8 < fVar10) {
return (CDirectorScriptedEventManager)0x1;
}
}
if (fVar10 != -1.0) {
(**(code **)(*(int *)(this + 0xb0) + 4))(this + 0xb0,this + 0xb8);
*(undefined4 *)(this + 0xb8) = 0xbf800000;
}
lVar8 = (longdouble)CDirector::GetMobSpawnMaxInterval(TheDirector);
lVar9 = (longdouble)CDirector::GetMobSpawnMinInterval(TheDirector);
lVar8 = (longdouble)RandomFloat((float)lVar9,(float)lVar8);
pCVar3 = TheDirector;
fVar10 = (float)lVar8;
pCVar1 = TheDirector + 0x294;
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar10 != *(float *)(pCVar3 + 0x29c)) {
(**(code **)(*(int *)(pCVar3 + 0x294) + 4))(pCVar1,pCVar3 + 0x29c);
*(float *)(pCVar3 + 0x29c) = (float)lVar8 + fVar10;
}
if (fVar10 != *(float *)(pCVar3 + 0x298)) {
(**(code **)(*(int *)(pCVar3 + 0x294) + 4))(pCVar1,pCVar3 + 0x298);
*(float *)(pCVar3 + 0x298) = fVar10;
}
*(undefined4 *)(TheZombieManager + 0x210) = 0;
UTIL_LogPrintf("%3.2f: ZombieManager::SetPendingMobCount: Pending mob set to %d.\n",
(double)*(float *)(gpGlobals + 0xc),0);
iVar6 = CDirector::GetMobSize(TheDirector);
ZombieManager::SpawnMob(TheZombieManager,iVar6);
ChangeFinaleStage(this,0xd,0);
return (CDirectorScriptedEventManager)0x1;
case 0xf:
fVar10 = *(float *)(this + 0x8c);
lVar8 = (longdouble)
CDirector::GetScriptValue
(TheDirector,"CustomTankKiteDistance",
*(float *)(DirectorGauntletTankKiteDist._28_4_ + 0x2c));
fVar11 = *(float *)(TheDirector + 0x24c);
if (fVar11 <= (float)lVar8 + fVar10) {
iVar6 = CDirectorTacticalServices::GetCommonInfectedCount
(*(CDirectorTacticalServices **)(TheDirector + 0x628),0);
if (iVar6 != 0) {
return (CDirectorScriptedEventManager)0x1;
}
fVar11 = *(float *)(TheDirector + 0x24c);
}
*(float *)(this + 0x8c) = fVar11;
ChangeFinaleStage(this,0x10,0);
break;
case 0x10:
fVar10 = *(float *)(this + 0x8c);
lVar8 = (longdouble)
CDirector::GetScriptValue
(TheDirector,"CustomTankKiteDistance",
*(float *)(DirectorGauntletTankKiteDist._28_4_ + 0x2c));
if ((float)lVar8 + fVar10 < *(float *)(TheDirector + 0x24c)) {
ChangeFinaleStage(this,0xd);
}
CVar5 = this[0x8b];
if (CVar5 == (CDirectorScriptedEventManager)0x0) {
if (*(int *)(TheDirector + 0x1c0) < 1) {
CVar5 = this[0x8a];
if (CVar5 != (CDirectorScriptedEventManager)0x0) {
ChangeFinaleStage(this,0xd,0);
return CVar5;
}
CVar5 = (CDirectorScriptedEventManager)
ZombieManager::GetRandomPZSpawnPosition(TheZombieManager,8,10,0,local_34);
if (CVar5 != (CDirectorScriptedEventManager)0x0) {
lVar8 = (longdouble)RandomFloat(0,0x43b40000);
local_24 = (float)lVar8;
local_28 = 0;
local_20 = 0;
pCVar7 = (CBaseEntity *)
ZombieManager::SpawnTank(TheZombieManager,local_34,(QAngle *)&local_28);
if (pCVar7 != (CBaseEntity *)0x0) {
CDirector::TryOfferingTankBot(TheDirector,pCVar7,true);
this[0x8b] = (CDirectorScriptedEventManager)0x1;
this[0x8a] = (CDirectorScriptedEventManager)0x0;
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + 5.0 != *(float *)(this + 0xfc)) {
(**(code **)(*(int *)(this + 0xf4) + 4))(this + 0xf4,this + 0xfc);
*(float *)(this + 0xfc) = (float)lVar8 + 5.0;
}
if (*(float *)(this + 0xf8) == 5.0) {
return (CDirectorScriptedEventManager)0x1;
}
(**(code **)(*(int *)(this + 0xf4) + 4))(this + 0xf4,this + 0xf8);
*(undefined4 *)(this + 0xf8) = 0x40a00000;
return CVar5;
}
}
DevMsg("Failed to create tank during custom tank finale phase.\n");
StopTankMusic();
return (CDirectorScriptedEventManager)0x1;
}
}
else {
if (0 < *(int *)(TheDirector + 0x1c0)) {
this[0x8a] = (CDirectorScriptedEventManager)0x1;
this[0x8b] = (CDirectorScriptedEventManager)0x0;
}
lVar8 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0xfc) <= (float)lVar8) {
this[0x8a] = (CDirectorScriptedEventManager)0x0;
this[0x8b] = (CDirectorScriptedEventManager)0x0;
if (*(float *)(this + 0xfc) != -1.0) {
(**(code **)(*(int *)(this + 0xf4) + 4))(this + 0xf4,this + 0xfc);
*(undefined4 *)(this + 0xfc) = 0xbf800000;
return CVar5;
}
}
}
break;
case 0x11:
if (this[0x8b] != (CDirectorScriptedEventManager)0x0) {
if (0 < *(int *)(TheDirector + 0x1c0)) {
this[0x8a] = (CDirectorScriptedEventManager)0x1;
this[0x8b] = (CDirectorScriptedEventManager)0x0;
if (*(float *)(this + 0xfc) != -1.0) {
(**(code **)(*(int *)(this + 0xf4) + 4))(this + 0xf4,this + 0xfc);
*(undefined4 *)(this + 0xfc) = 0xbf800000;
}
}
lVar8 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0xfc) <= (float)lVar8) {
this[0x8a] = (CDirectorScriptedEventManager)0x0;
this[0x8b] = (CDirectorScriptedEventManager)0x0;
if (*(float *)(this + 0xfc) != -1.0) {
(**(code **)(*(int *)(this + 0xf4) + 4))(this + 0xf4,this + 0xfc);
*(undefined4 *)(this + 0xfc) = 0xbf800000;
}
}
}
if (*(int *)(TheDirector + 0x1c0) < 1) {
pCVar2 = this + 0xf4;
if (*(float *)(this + 0xfc) <= 0.0) {
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + 20.0 != *(float *)(this + 0xfc)) {
(**(code **)(*(int *)(this + 0xf4) + 4))(pCVar2,this + 0xfc);
*(float *)(this + 0xfc) = (float)lVar8 + 20.0;
}
if (*(float *)(this + 0xf8) != 20.0) {
(**(code **)(*(int *)(this + 0xf4) + 4))(pCVar2,this + 0xf8);
*(undefined4 *)(this + 0xf8) = 0x41a00000;
}
}
lVar8 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0xfc) <= (float)lVar8) {
cVar4 = ZombieManager::GetRandomPZSpawnPosition(TheZombieManager,8,10,0,local_34);
if (cVar4 != '\0') {
lVar8 = (longdouble)RandomFloat(0,0x43b40000);
local_24 = (float)lVar8;
local_28 = 0;
local_20 = 0;
pCVar7 = (CBaseEntity *)
ZombieManager::SpawnTank(TheZombieManager,local_34,(QAngle *)&local_28);
if (pCVar7 != (CBaseEntity *)0x0) {
CDirector::TryOfferingTankBot(TheDirector,pCVar7,true);
this[0x8b] = (CDirectorScriptedEventManager)0x1;
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + 5.0 != *(float *)(this + 0xfc)) {
(**(code **)(*(int *)(this + 0xf4) + 4))(pCVar2,this + 0xfc);
*(float *)(this + 0xfc) = (float)lVar8 + 5.0;
}
if (*(float *)(this + 0xf8) != 5.0) {
(**(code **)(*(int *)(this + 0xf4) + 4))(pCVar2,this + 0xf8);
*(undefined4 *)(this + 0xf8) = 0x40a00000;
}
}
}
}
}
pCVar1 = TheDirector;
lVar8 = (longdouble)CountdownTimer::Now();
if (*(float *)(pCVar1 + 0x29c) <= (float)lVar8) {
lVar8 = (longdouble)CDirector::GetMobSpawnMinInterval(TheDirector);
pCVar3 = TheDirector;
fVar10 = (float)lVar8;
pCVar1 = TheDirector + 0x294;
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar10 != *(float *)(pCVar3 + 0x29c)) {
(**(code **)(*(int *)(pCVar3 + 0x294) + 4))(pCVar1,pCVar3 + 0x29c);
*(float *)(pCVar3 + 0x29c) = (float)lVar8 + fVar10;
}
if (fVar10 != *(float *)(pCVar3 + 0x298)) {
(**(code **)(*(int *)(pCVar3 + 0x294) + 4))(pCVar1,pCVar3 + 0x298);
*(float *)(pCVar3 + 0x298) = fVar10;
}
*(undefined4 *)(TheZombieManager + 0x210) = 0;
UTIL_LogPrintf("%3.2f: ZombieManager::SetPendingMobCount: Pending mob set to %d.\n",
(double)*(float *)(gpGlobals + 0xc),0);
iVar6 = CDirector::GetMobSize(TheDirector);
ZombieManager::SpawnMob(TheZombieManager,iVar6);
return (CDirectorScriptedEventManager)0x1;
}
break;
case 0x13:
cVar4 = UpdateScriptedSetupStage(this);
joined_r0x008b9c7a:
if (cVar4 == '\0') {
IncrementCustomFinaleStage(this);
return (CDirectorScriptedEventManager)0x1;
}
break;
case 0x16:
cVar4 = UpdateScriptedResultsStage(this,*(int *)(this + 0xec));
if (cVar4 == '\0') {
ChangeFinaleStage(this,0x12,0);
CDirector::InitiateEndScenario(TheDirector);
return (CDirectorScriptedEventManager)0x1;
}
}
return (CDirectorScriptedEventManager)0x1;
}
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.