TerrorNavArea::ScriptGetLadders
0x00978570 · 293 bytes · __thiscall
_ZN13TerrorNavArea16ScriptGetLaddersEiP9HSCRIPT__
Decompiled
undefined (3 params)
/* TerrorNavArea::ScriptGetLadders(int, HSCRIPT__*) */
void __thiscall TerrorNavArea::ScriptGetLadders(TerrorNavArea *this,int param_1,HSCRIPT__ *param_2)
{
code *pcVar1;
int *piVar2;
int iVar3;
int in_GS_OFFSET;
void *local_138 [2];
undefined2 local_130;
ushort local_12e;
CFmtStrN<256> local_12c [5];
undefined1 local_127 [263];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((param_1 < 2) && (param_2 + -1 < (HSCRIPT__ *)0xfffffffe)) {
piVar2 = *(int **)(this + param_1 * 4 + 0x68);
if (0 < *piVar2) {
iVar3 = 0;
do {
if ((CNavLadder *)piVar2[iVar3 + 1] != (CNavLadder *)0x0) {
pcVar1 = *(code **)(*g_pScriptVM + 0x78);
local_138[0] = (void *)CNavLadder::GetScriptInstance((CNavLadder *)piVar2[iVar3 + 1]);
local_12e = 0;
local_130 = 0x20;
/* try { // try from 0097863d to 00978663 has its CatchHandler @ 00978693 */
CFmtStrN<256>::CFmtStrN(local_12c,"ladder%i",iVar3);
(*pcVar1)(g_pScriptVM,param_2,local_127,local_138);
if ((local_12e & 1) != 0) {
free(local_138[0]);
}
}
iVar3 = iVar3 + 1;
piVar2 = *(int **)(this + param_1 * 4 + 0x68);
} while (iVar3 < *piVar2);
}
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.