FloodArea_r
0x0011b310 · 277 bytes · __cdecl
_Z11FloodArea_rP17CCollisionBSPDataP7carea_ti
Decompiled
undefined (3 params)
/* FloodArea_r(CCollisionBSPData*, carea_t*, int) */
void FloodArea_r(CCollisionBSPData *param_1,carea_t *param_2,int param_3)
{
ushort uVar1;
ushort *puVar2;
int iVar3;
if (*(int *)(param_2 + 0xc) == *(int *)(param_1 + 0x254)) {
if (*(int *)(param_2 + 8) == param_3) {
return;
}
Sys_Error("FloodArea_r: reflooded");
}
*(int *)(param_2 + 8) = param_3;
iVar3 = *(int *)(param_2 + 4);
*(undefined4 *)(param_2 + 0xc) = *(undefined4 *)(param_1 + 0x254);
if ((iVar3 < 0) || (*(int *)(param_1 + 0x238) <= iVar3)) {
Error("Cannot load corrupted map.\n");
}
puVar2 = (ushort *)(*(int *)(param_1 + 0x234) + iVar3 * 0xc);
if (0 < *(int *)param_2) {
iVar3 = 0;
do {
uVar1 = *puVar2;
if (*(int *)(param_1 + 0x260) <= (int)(uint)uVar1) {
Error("Cannot load corrupted map.\n");
}
if (*(char *)(*(int *)(param_1 + 0x25c) + (uint)uVar1) != '\0') {
uVar1 = puVar2[1];
if (*(int *)(param_1 + 0x22c) <= (int)(uint)uVar1) {
Error("Cannot load corrupted map.\n");
}
FloodArea_r(param_1,(carea_t *)((uint)uVar1 * 0x10 + *(int *)(param_1 + 0x228)),param_3);
}
iVar3 = iVar3 + 1;
puVar2 = puVar2 + 6;
} while (iVar3 < *(int *)param_2);
}
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.