Map_VisSetup
0x001a1b80 · 245 bytes · __cdecl
_Z12Map_VisSetupP7model_tiPK6VectorbRj
Decompiled
undefined (5 params)
/* Map_VisSetup(model_t*, int, Vector const*, bool, unsigned int&) */
void Map_VisSetup(model_t *param_1,int param_2,Vector *param_3,bool param_4,uint *param_5)
{
int iVar1;
uint uVar2;
undefined4 uVar3;
undefined4 *puVar4;
int iVar5;
DAT_003ab1c9 = 0;
DAT_003ab1c8 = '\0';
vis = 0x20;
if (param_2 < 0x21) {
vis = param_2;
}
*param_5 = 0;
if (0 < vis) {
iVar5 = 0;
puVar4 = &DAT_003a8f48;
do {
iVar1 = CM_PointLeafnum(param_3);
uVar2 = CM_LeafFlags(iVar1);
if ((uVar2 & 5) != 0) {
DAT_003ab1c8 = '\x01';
}
if ((uVar2 & 2) != 0) {
DAT_003ab1c9 = 1;
*param_5 = *param_5 | 1;
}
iVar5 = iVar5 + 1;
uVar3 = CM_LeafCluster(iVar1);
puVar4[3] = uVar3;
*puVar4 = *(undefined4 *)param_3;
puVar4[1] = *(undefined4 *)(param_3 + 4);
puVar4[2] = *(undefined4 *)(param_3 + 8);
puVar4 = puVar4 + 5;
param_3 = param_3 + 0xc;
} while (iVar5 < vis);
}
if (DAT_003ab1c8 == '\0') {
DAT_003ab1c9 = 0;
}
Map_VisMark(param_4,param_1);
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.