CDirectorChallengeMode::EndScriptedMode
0x0089ddf0 · 599 bytes · __thiscall
_ZN22CDirectorChallengeMode15EndScriptedModeEv
Decompiled
undefined (1 param)
/* CDirectorChallengeMode::EndScriptedMode() */
undefined4 __thiscall CDirectorChallengeMode::EndScriptedMode(CDirectorChallengeMode *this)
{
int iVar1;
int iVar2;
int iVar3;
char *local_34 [2];
short local_2c;
ushort local_2a;
char *local_28;
undefined4 local_24;
undefined2 local_20;
ushort local_1e;
iVar1 = (**(code **)(*g_pScriptVM + 0x48))
(g_pScriptVM,"EndScriptedMode",*(undefined4 *)(TheDirector + 0x4b8),0);
(**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar1);
iVar3 = TheDirector;
if (iVar1 == 0) {
return 0;
}
local_2c = 0;
local_2a = 0;
local_34[0] = (char *)0x0;
/* try { // try from 0089de90 to 0089dee6 has its CatchHandler @ 0089e05f */
iVar1 = (**(code **)(*g_pScriptVM + 0x48))
(g_pScriptVM,"EndScriptedMode",*(undefined4 *)(TheDirector + 0x4b8),0);
if (iVar1 != 0) {
iVar2 = (**(code **)(*g_pScriptVM + 0x50))
(g_pScriptVM,iVar1,0,0,local_34,*(undefined4 *)(iVar3 + 0x4b8),1);
(**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar1);
iVar3 = TheDirector;
if (iVar2 == 0) {
local_24 = 0;
local_20 = 5;
local_28 = (char *)(int)(float)local_34[0];
if (local_2c == 5) {
local_28 = local_34[0];
}
local_1e = 0;
*(char **)(this + 4) = local_28;
/* try { // try from 0089df50 to 0089dfa2 has its CatchHandler @ 0089e071 */
iVar1 = (**(code **)(*g_pScriptVM + 0x48))
(g_pScriptVM,"GetScoreboardFilename",*(undefined4 *)(iVar3 + 0x4b8),0);
if (iVar1 != 0) {
(**(code **)(*g_pScriptVM + 0x50))
(g_pScriptVM,iVar1,&local_28,1,local_34,*(undefined4 *)(iVar3 + 0x4b8),1,&local_28
);
(**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar1);
}
iVar3 = TheDirector;
if ((local_1e & 1) != 0) {
free(local_28);
iVar3 = TheDirector;
}
TheDirector = iVar3;
if (local_2c == 0x1f) {
V_strncpy((char *)(this + 8),local_34[0],0x104);
iVar3 = TheDirector;
*(undefined1 *)(TheDirector + 0x4e4) = 1;
}
/* try { // try from 0089dfc2 to 0089e02b has its CatchHandler @ 0089e05f */
CDirector::EndScenario(iVar3,*(undefined4 *)(this + 4));
if ((local_2a & 1) != 0) {
free(local_34[0]);
}
return 1;
}
}
if ((local_2a & 1) != 0) {
free(local_34[0]);
}
return 0;
}
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.