CDirector::InitChallengeScope
0x00875590 · 150 bytes · __thiscall
_ZN9CDirector18InitChallengeScopeEv
Decompiled
undefined (1 param)
/* CDirector::InitChallengeScope() */
void __thiscall CDirector::InitChallengeScope(CDirector *this)
{
int iVar1;
undefined4 uVar2;
CDirector *in_stack_ffffffe4;
int in_stack_ffffffe8;
if (g_pScriptVM != (int *)0x0) {
TermScriptLevel(in_stack_ffffffe4,in_stack_ffffffe8);
iVar1 = 0;
if (*(int *)(this + 0x494) != -1) {
iVar1 = *(int *)(this + 0x494);
}
uVar2 = (**(code **)(*g_pScriptVM + 0x3c))(g_pScriptVM,"ChallengeScript",iVar1);
*(undefined4 *)(this + 0x4ac) = uVar2;
return;
}
*(undefined4 *)(this + 0x4ac) = 0xffffffff;
*(undefined4 *)(this + 0x4b0) = 0;
if (*(undefined4 **)(this + 0x4b4) !=
&CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::StaticData()::
staticData) {
free(*(undefined4 **)(this + 0x4b4));
*(undefined4 **)(this + 0x4b4) =
&CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::
StaticData()::staticData;
}
*(undefined4 *)(this + 0x4d0) = 0;
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.