CDirectorScriptedEventManager::UpdateScriptedEscapeStage
0x008b7ba0 · 596 bytes · __thiscall
_ZN29CDirectorScriptedEventManager25UpdateScriptedEscapeStageEv
Decompiled
undefined (1 param)
/* CDirectorScriptedEventManager::UpdateScriptedEscapeStage() */
void __thiscall
CDirectorScriptedEventManager::UpdateScriptedEscapeStage(CDirectorScriptedEventManager *this)
{
float fVar1;
char cVar2;
int iVar3;
CBaseEntity *pCVar4;
longdouble lVar5;
Vector local_34 [12];
undefined4 local_28;
float local_24;
undefined4 local_20;
if (*(int *)(this + 0x128) == 4) {
StartPanicEvent(this,1,(CBasePlayer *)0x0);
}
if (*(int *)this == 1) {
if (UpdateScriptedEscapeStage()::bTankWasInPlay == '\0') {
fVar1 = *(float *)(gpGlobals + 0xc);
iVar3 = *(int *)(TheDirector + 0x1c0);
}
else {
iVar3 = *(int *)(TheDirector + 0x1c0);
if (iVar3 < 1) {
UpdateScriptedEscapeStage()::timeTankDied = (float)*(undefined4 *)(gpGlobals + 0xc);
UpdateScriptedEscapeStage()::bTankWasInPlay = 0;
return;
}
fVar1 = *(float *)(gpGlobals + 0xc);
}
UpdateScriptedEscapeStage()::bTankWasInPlay = 0 < iVar3;
if (fVar1 - UpdateScriptedEscapeStage()::timeTankDied < 20.0) {
return;
}
}
lVar5 = (longdouble)CountdownTimer::Now();
if (((*(float *)(this + 0x98) <= (float)lVar5) && (*(int *)(TheDirector + 0x1c0) < 1)) &&
(iVar3 = CDirector::GetScriptValue(TheDirector,"EscapeSpawnTanks",1), iVar3 != 0)) {
cVar2 = ZombieManager::GetRandomPZSpawnPosition(TheZombieManager,8,10,0,local_34);
if (cVar2 != '\0') {
lVar5 = (longdouble)RandomFloat(0,0x43b40000);
local_24 = (float)lVar5;
local_28 = 0;
local_20 = 0;
pCVar4 = (CBaseEntity *)
ZombieManager::SpawnTank(TheZombieManager,local_34,(QAngle *)&local_28);
if (pCVar4 != (CBaseEntity *)0x0) {
CDirector::TryOfferingTankBot(TheDirector,pCVar4,true);
}
}
fVar1 = *(float *)(DirectorFinaleStageDelay._28_4_ + 0x2c);
lVar5 = (longdouble)CountdownTimer::Now();
if ((float)lVar5 + fVar1 != *(float *)(this + 0x98)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x98);
*(float *)(this + 0x98) = (float)lVar5 + fVar1;
}
if (fVar1 != *(float *)(this + 0x94)) {
(**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x94);
*(float *)(this + 0x94) = fVar1;
}
}
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.