BuildPropOffsetToIndexMap
0x0014cc80 · 399 bytes · __cdecl
_Z25BuildPropOffsetToIndexMapP17CSendTablePrecalcPK20CStandardSendProxies
Decompiled
undefined (2 params)
/* BuildPropOffsetToIndexMap(CSendTablePrecalc*, CStandardSendProxies const*) */
void BuildPropOffsetToIndexMap(CSendTablePrecalc *param_1,CStandardSendProxies *param_2)
{
int iVar1;
int iVar2;
uint uVar3;
int iVar4;
int local_154;
int local_150;
undefined **local_140;
int local_13c;
int aiStack_138 [65];
uint local_34;
undefined4 local_30;
CSendTablePrecalc *local_24;
CStandardSendProxies *local_20;
CDatatableStack::CDatatableStack((CDatatableStack *)&local_140,param_1,&DAT_00000001,-1);
local_140 = &PTR_RecurseAndCallProxies_002adce8;
local_24 = param_1;
local_20 = param_2;
CDatatableStack::Init((CDatatableStack *)&local_140,false);
if (0 < *(int *)(param_1 + 0x38)) {
uVar3 = 0;
do {
while( true ) {
local_34 = uVar3;
local_30 = *(undefined4 *)(*(int *)(local_13c + 0x2c) + uVar3 * 4);
iVar2 = aiStack_138[*(byte *)(*(int *)(local_13c + 0x40) + uVar3)];
if (iVar2 != 0) break;
LAB_0014cdc6:
uVar3 = uVar3 + 1;
if (*(int *)(param_1 + 0x38) <= (int)uVar3) {
return;
}
}
iVar1 = *(int *)(*(int *)(param_1 + 0x2c) + uVar3 * 4);
if (*(int *)(iVar1 + 8) != 5) {
iVar2 = iVar2 + -1 + *(int *)(iVar1 + 0x4c);
if (iVar2 != 0) {
local_154 = 0;
local_150 = 1;
LAB_0014cd4e:
iVar4 = 0;
do {
if ((*(byte *)(iVar1 + 0x3d) & 4) == 0) {
AddPropOffsetToMap(param_1,uVar3,iVar2,*(char **)(iVar1 + 0x30));
}
else {
AddPropOffsetToMap(param_1,uVar3 | 0x8000,iVar2,*(char **)(iVar1 + 0x30));
}
iVar4 = iVar4 + 1;
iVar2 = iVar2 + local_154;
} while (iVar4 != local_150);
}
goto LAB_0014cdc6;
}
local_150 = *(int *)(iVar1 + 0x20);
iVar2 = iVar2 + *(int *)(*(int *)(iVar1 + 0x18) + 0x4c) + -1;
local_154 = *(int *)(iVar1 + 0x24);
if (iVar2 == 0) goto LAB_0014cdc6;
if (0 < local_150) goto LAB_0014cd4e;
uVar3 = uVar3 + 1;
} while ((int)uVar3 < *(int *)(param_1 + 0x38));
}
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.