MarkWaterSurfaces_r
0x0019a480 · 209 bytes · __cdecl
_Z19MarkWaterSurfaces_rP7mnode_t
Decompiled
undefined (1 param)
/* MarkWaterSurfaces_r(mnode_t*) */
void MarkWaterSurfaces_r(mnode_t *param_1)
{
ushort uVar1;
uint uVar2;
int iVar3;
int *piVar4;
uint *puVar5;
int iVar6;
uint uVar7;
iVar6 = *(int *)param_1;
while( true ) {
if (iVar6 == 1) {
return;
}
if (-1 < iVar6) break;
MarkWaterSurfaces_r(*(mnode_t **)(param_1 + 0x34));
param_1 = *(mnode_t **)(param_1 + 0x38);
iVar6 = *(int *)param_1;
}
uVar7 = 0x40000;
uVar1 = *(ushort *)(param_1 + 0x34);
if (*(short *)(param_1 + 0x32) != -1) {
uVar7 = 0x20000;
}
iVar6 = *(int *)(DAT_003a172c + 0x90);
iVar3 = 0;
if (*(short *)(param_1 + 0x36) != 0) {
do {
puVar5 = *(uint **)(iVar6 + (uint)uVar1 * 4 + iVar3 * 4);
uVar2 = *puVar5;
if ((uVar2 & 0x10800) == 0) {
*puVar5 = uVar2 | uVar7;
}
iVar3 = iVar3 + 1;
} while (iVar3 < (int)(uint)*(ushort *)(param_1 + 0x36));
}
if (*(short *)(param_1 + 0x3e) != 0) {
iVar6 = 0;
do {
iVar3 = (uint)*(ushort *)(param_1 + 0x3c) + iVar6;
iVar6 = iVar6 + 1;
piVar4 = (int *)DispInfo_IndexArray(*(void **)(DAT_003a172c + 0x6c),
(uint)*(ushort *)
(*(int *)(DAT_003a172c + 0xe0) + iVar3 * 2));
puVar5 = (uint *)(**(code **)(*piVar4 + 0x18))(piVar4);
*puVar5 = *puVar5 | uVar7;
} while (iVar6 < (int)(uint)*(ushort *)(param_1 + 0x3e));
}
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.