Mod_LoadLeafMinDistToWater
0x001991c0 · 327 bytes · unknown
_Z26Mod_LoadLeafMinDistToWaterv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Mod_LoadLeafMinDistToWater() */
void Mod_LoadLeafMinDistToWater(void)
{
uint uVar1;
undefined1 *puVar2;
char *pcVar3;
void *__dest;
uint uVar4;
int in_GS_OFFSET;
uint local_140 [3];
int local_134;
short *local_130;
int local_128;
undefined1 local_124 [260];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CMapLoadHelper::CMapLoadHelper((CMapLoadHelper *)local_140,0x2e);
uVar4 = local_140[0] >> 1;
if (uVar4 != 0) {
if (*local_130 == -1) {
uVar1 = 0;
do {
uVar1 = uVar1 + 1;
if (uVar1 == uVar4) goto LAB_0019921e;
} while (local_130[uVar1] == -1);
}
if ((local_140[0] != 0) && (g_pMaterialSystemHardwareConfig != 0)) {
if ((local_140[0] & 1) != 0) {
Host_Error("Mod_LoadLeafMinDistToWater: funny lump size in %s",s_szMapPathName);
uVar4 = local_140[0] >> 1;
}
puVar2 = s_szMapPathName;
if ((&s_MapLumpFiles)[local_128 * 7] != 0) {
puVar2 = local_124;
}
/* try { // try from 001992b2 to 001992ff has its CatchHandler @ 00199312 */
pcVar3 = (char *)va("%s [%s]",puVar2,"leafmindisttowater");
__dest = (void *)Hunk_AllocName(uVar4 * 2,pcVar3,true);
memcpy(__dest,local_130,uVar4 * 2);
*(void **)(s_pMap + 0x54) = __dest;
goto LAB_0019922a;
}
}
LAB_0019921e:
*(undefined4 *)(s_pMap + 0x54) = 0;
LAB_0019922a:
if (local_134 != 0) {
(**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_134);
}
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.