CDirectorScriptedEventManager::UpdateScriptedTankStage
0x008b59f0 · 556 bytes · __thiscall
_ZN29CDirectorScriptedEventManager23UpdateScriptedTankStageERi
Decompiled
undefined (2 params)
/* CDirectorScriptedEventManager::UpdateScriptedTankStage(int&) */
uint __thiscall
CDirectorScriptedEventManager::UpdateScriptedTankStage
(CDirectorScriptedEventManager *this,int *param_1)
{
float fVar1;
CDirectorScriptedEventManager CVar2;
char cVar3;
CBaseEntity *pCVar4;
longdouble lVar5;
Vector local_34 [12];
undefined4 local_28;
float local_24;
undefined4 local_20;
if (*param_1 < 1) {
CVar2 = this[0x8b];
if (CVar2 == (CDirectorScriptedEventManager)0x0) {
return CONCAT31((int3)((uint)*(int *)(TheDirector + 0x1c0) >> 8),
0 < *(int *)(TheDirector + 0x1c0));
}
if (*(int *)(TheDirector + 0x1c0) < 1) {
return 1;
}
this[0x8b] = (CDirectorScriptedEventManager)0x0;
return (uint)(byte)CVar2;
}
if (*(float *)(this + 0xfc) <= 0.0) {
fVar1 = *(float *)(DirectorCustomFinaleTankSpacing._28_4_ + 0x2c);
lVar5 = (longdouble)CountdownTimer::Now();
if ((float)lVar5 + fVar1 != *(float *)(this + 0xfc)) {
(**(code **)(*(int *)(this + 0xf4) + 4))(this + 0xf4,this + 0xfc);
*(float *)(this + 0xfc) = (float)lVar5 + fVar1;
}
if (fVar1 == *(float *)(this + 0xf8)) {
return 1;
}
(**(code **)(*(int *)(this + 0xf4) + 4))(this + 0xf4,this + 0xf8);
*(float *)(this + 0xf8) = fVar1;
return 1;
}
lVar5 = (longdouble)CountdownTimer::Now();
if ((float)lVar5 < *(float *)(this + 0xfc)) {
return 1;
}
cVar3 = ZombieManager::GetRandomPZSpawnPosition(TheZombieManager,8,10,0,local_34);
if (cVar3 != '\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);
this[0x8b] = (CDirectorScriptedEventManager)0x1;
goto LAB_008b5a8d;
}
}
Warning("Failed to create tank during custom tank finale phase.\n");
StopTankMusic();
LAB_008b5a8d:
*param_1 = *param_1 + -1;
if (*(float *)(this + 0xfc) != -1.0) {
(**(code **)(*(int *)(this + 0xf4) + 4))(this + 0xf4,this + 0xfc);
*(undefined4 *)(this + 0xfc) = 0xbf800000;
}
return 1;
}
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.