CDirectorScriptedEventManager::IncrementCustomFinaleStage
0x008b9260 · 524 bytes · __thiscall
_ZN29CDirectorScriptedEventManager26IncrementCustomFinaleStageEv
Decompiled
undefined (1 param)
/* CDirectorScriptedEventManager::IncrementCustomFinaleStage() */
void __thiscall
CDirectorScriptedEventManager::IncrementCustomFinaleStage(CDirectorScriptedEventManager *this)
{
CDirector *pCVar1;
void *pvVar2;
char *pcVar3;
int iVar4;
int in_GS_OFFSET;
void *local_f8;
undefined4 local_f4;
undefined2 local_f0;
ushort local_ee;
void *local_ec;
undefined4 local_e8;
undefined2 local_e4;
ushort local_e2;
char local_e0 [64];
char local_a0 [128];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
pvVar2 = (void *)GetNextScriptedStage(this);
if (**(char **)(TheDirector + 0x648) != '\0') {
CDirector::RandomizeSpecialSpawnTimers(TheDirector);
SetSpawnDirectionFilter();
}
V_snprintf(local_e0,0x40,"%c_CustomFinaleMusic%1d",(int)(char)this[0xf0],
*(undefined4 *)(this + 0xe8));
pcVar3 = (char *)CDirector::GetScriptValue(TheDirector,local_e0,(char *)0x0,local_a0,0x80);
ChangeScriptedEventStage(this,(int)pvVar2,pcVar3);
pCVar1 = TheDirector;
iVar4 = (**(code **)(*g_pScriptVM + 0x48))
(g_pScriptVM,"OnBeginCustomFinaleStage",*(undefined4 *)(TheDirector + 0x4a0),0);
if (iVar4 != 0) {
local_f8 = *(void **)(this + 0xe8);
local_ee = 0;
local_f0 = 5;
local_e2 = 0;
local_e4 = 5;
local_f4 = 0;
local_e8 = 0;
/* try { // try from 008b93d3 to 008b93d5 has its CatchHandler @ 008b9477 */
local_ec = pvVar2;
(**(code **)(*g_pScriptVM + 0x50))
(g_pScriptVM,iVar4,&local_f8,2,0,*(undefined4 *)(pCVar1 + 0x4a0),1);
if ((local_e2 & 1) != 0) {
free(local_ec);
local_e2 = local_e2 & 0xfffe;
}
local_ec = (void *)0x0;
local_e8 = 0;
local_e4 = 0;
if ((local_ee & 1) != 0) {
free(local_f8);
}
(**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar4);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.