CollisionBSPData_LoadVisibility
0x00122a50 · 211 bytes · __cdecl
_Z31CollisionBSPData_LoadVisibilityP17CCollisionBSPData
Decompiled
undefined (1 param)
/* CollisionBSPData_LoadVisibility(CCollisionBSPData*) */
void CollisionBSPData_LoadVisibility(CCollisionBSPData *param_1)
{
undefined4 uVar1;
int iVar2;
size_t __n;
void *__src;
int in_GS_OFFSET;
CMapLoadHelper local_140 [288];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CMapLoadHelper::CMapLoadHelper(local_140,4);
/* try { // try from 00122a83 to 00122b05 has its CatchHandler @ 00122b23 */
uVar1 = CMapLoadHelper::LumpSize(local_140);
*(undefined4 *)(param_1 + 0xd8) = uVar1;
iVar2 = CMapLoadHelper::LumpSize(local_140);
if (0x1000000 < iVar2) {
Sys_Error("Map has too large visibility lump");
}
__n = CMapLoadHelper::LumpSize(local_140);
if (__n == 0) {
*(undefined4 *)(param_1 + 0xdc) = 0;
}
else {
uVar1 = Hunk_AllocName(__n,"map_vis",false);
*(undefined4 *)(param_1 + 0xdc) = uVar1;
__src = (void *)CMapLoadHelper::LumpBase(local_140);
memcpy(*(void **)(param_1 + 0xdc),__src,__n);
}
CMapLoadHelper::~CMapLoadHelper(local_140);
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.