CM_AreasConnected
0x0011b6d0 · 151 bytes · __cdecl
_Z17CM_AreasConnectedii
Decompiled
undefined (2 params)
/* CM_AreasConnected(int, int) */
bool CM_AreasConnected(int param_1,int param_2)
{
int iVar1;
bool bVar2;
bVar2 = true;
if (*(int *)(map_noareas._28_4_ + 0x30) == 0) {
if ((DAT_00394524 <= param_1) || (DAT_00394524 <= param_2)) {
Sys_Error("area(1==%i, 2==%i) >= numareas (%i): Check if engine->ResetPVS() was called from ClientSetupVisibility"
,param_1,param_2,DAT_00394524);
}
if ((param_1 < 0) || (DAT_0039452c <= param_1)) {
Error("Cannot load corrupted map.\n");
}
iVar1 = *(int *)(DAT_00394528 + 8 + param_1 * 0x10);
if ((param_2 < 0) || (DAT_0039452c <= param_2)) {
Error("Cannot load corrupted map.\n");
}
bVar2 = iVar1 == *(int *)(DAT_00394528 + 8 + param_2 * 0x10);
}
return bVar2;
}
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.