CLogicScript::RunVScripts
0x006ed880 · 532 bytes · __thiscall
_ZN12CLogicScript11RunVScriptsEv
Decompiled
undefined (1 param)
/* CLogicScript::RunVScripts() */
void __thiscall CLogicScript::RunVScripts(CLogicScript *this)
{
int *piVar1;
int iVar2;
int *__ptr;
int iVar3;
int iVar4;
int iVar5;
undefined1 *local_28;
undefined4 local_24;
undefined2 local_20;
ushort local_1e;
iVar3 = 0xf;
do {
if (*(int *)(this + iVar3 * 4 + 0x440) != 0) {
iVar2 = (**(code **)(*g_pScriptVM + 0x2c))(g_pScriptVM,RunVScripts()::szAddCode,0);
if (iVar2 != 0) {
CBaseEntity::ValidateScriptScope((CBaseEntity *)this);
piVar1 = g_pScriptVM;
__ptr = *(int **)(this + 0x3f0);
if (0 < *__ptr) {
iVar4 = 0;
do {
if (*(int *)__ptr[iVar4 + 1] != 0) {
(**(code **)(*piVar1 + 0x4c))(piVar1,*(int *)__ptr[iVar4 + 1]);
}
iVar5 = iVar4 * 4;
iVar4 = iVar4 + 1;
**(undefined4 **)(*(int *)(this + 0x3f0) + 4 + iVar5) = 0xffffffff;
__ptr = *(int **)(this + 0x3f0);
} while (iVar4 < *__ptr);
}
if (__ptr != &CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>
::StaticData()::staticData) {
free(__ptr);
*(undefined4 **)(this + 0x3f0) =
&CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::
StaticData()::staticData;
}
(**(code **)(*g_pScriptVM + 0x34))(g_pScriptVM,iVar2,*(undefined4 *)(this + 1000),1);
iVar4 = (**(code **)(*g_pScriptVM + 0x48))
(g_pScriptVM,"__AppendToScriptGroup",*(undefined4 *)(this + 1000),0);
if (iVar4 != 0) {
iVar5 = 0;
do {
local_28 = *(undefined1 **)(this + iVar5 * 4 + 0x440);
local_20 = 0x1f;
local_24 = 0;
if (local_28 == (undefined1 *)0x0) {
local_28 = &DAT_00d539c2;
}
local_1e = 0;
/* try { // try from 006eda24 to 006eda26 has its CatchHandler @ 006eda99 */
(**(code **)(*g_pScriptVM + 0x50))
(g_pScriptVM,iVar4,&local_28,1,0,*(undefined4 *)(this + 1000),1);
if ((local_1e & 1) != 0) {
free(local_28);
}
iVar5 = iVar5 + 1;
} while (iVar5 <= iVar3);
(**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar4);
(**(code **)(*g_pScriptVM + 0xa0))
(g_pScriptVM,*(undefined4 *)(this + 1000),"__AppendToScriptGroup");
}
(**(code **)(*g_pScriptVM + 0x30))(g_pScriptVM,iVar2);
CBaseEntity::RunVScripts((CBaseEntity *)this);
return;
}
break;
}
iVar3 = iVar3 + -1;
} while (iVar3 != -1);
CBaseEntity::RunVScripts((CBaseEntity *)this);
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.