CDirectorSurvivalMode::StartSurvivalPanicEvent
0x008c00e0 · 527 bytes · __cdecl
_ZN21CDirectorSurvivalMode23StartSurvivalPanicEventEv
Decompiled
undefined (0 params)
/* CDirectorSurvivalMode::StartSurvivalPanicEvent() */
void CDirectorSurvivalMode::StartSurvivalPanicEvent(void)
{
CBaseEntity *this;
code *pcVar1;
char cVar2;
int *piVar3;
int iVar4;
uint uVar5;
int iVar6;
undefined4 local_48 [2];
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
int local_30 [8];
piVar3 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"create_panic_event",0,0)
;
if (piVar3 != (int *)0x0) {
(**(code **)(*piVar3 + 0x30))(piVar3,"userid",0);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar3,0);
}
DevMsg(2,"[SURVIVAL]: STAGE_MEGA_MOB\n");
local_30[0] = 0;
local_30[1] = 0;
local_30[2] = 0;
local_30[3] = 0;
local_30[4] = 0;
local_40 = 0xffffffff;
local_3c = 7;
local_38 = 3;
local_34 = 9;
/* try { // try from 008c019e to 008c02cf has its CatchHandler @ 008c02f8 */
ForEachPlayer<PlayerCollector>((PlayerCollector *)&local_40);
if (0 < local_30[3]) {
iVar6 = 0;
LAB_008c01c4:
do {
this = *(CBaseEntity **)(local_30[0] + iVar6 * 4);
CBaseEntity::EmitSound(this,"MegaMobIncoming",0.0,(float *)0x0);
cVar2 = (**(code **)(*(int *)this + 300))(this);
if (cVar2 != '\0') {
iVar4 = CBaseEntity::GetTeamNumber(this);
if (iVar4 == 2) {
pcVar1 = *(code **)(*(int *)this + 0x7b4);
CAI_Concept::CAI_Concept((CAI_Concept *)local_48,"PlayerWarnMegaMob");
(*pcVar1)(this,(CAI_Concept *)local_48,1,0,0,0,0);
iVar6 = iVar6 + 1;
if (local_30[3] <= iVar6) break;
goto LAB_008c01c4;
}
}
iVar6 = iVar6 + 1;
} while (iVar6 < local_30[3]);
}
local_48[0] = 0;
iVar6 = TheNextBots();
uVar5 = (uint)*(ushort *)(iVar6 + 0x10);
if (uVar5 != 0xffff) {
iVar4 = *(int *)(iVar6 + 4);
do {
cVar2 = AttackClosestSurvivor::operator()
((AttackClosestSurvivor *)local_48,*(INextBot **)(iVar4 + uVar5 * 8));
if (cVar2 == '\0') break;
iVar4 = *(int *)(iVar6 + 4);
uVar5 = (uint)*(ushort *)(iVar4 + 6 + uVar5 * 8);
} while (uVar5 != 0xffff);
}
iVar6 = CDirector::GetMegaMobSize(TheDirector);
if (1 < iVar6) {
ZombieManager::SpawnMegaMob(TheZombieManager);
}
local_30[3] = 0;
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
local_30[4] = local_30[0];
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
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.