DataTable_WriteSendTablesBuffer
0x001448f0 · 167 bytes · __cdecl
_Z31DataTable_WriteSendTablesBufferP11ServerClassP8bf_write
Decompiled
undefined (2 params)
/* DataTable_WriteSendTablesBuffer(ServerClass*, bf_write*) */
void DataTable_WriteSendTablesBuffer(ServerClass *param_1,bf_write *param_2)
{
ServerClass *pSVar1;
int iVar2;
byte *pbVar3;
ServerClass *pSVar4;
ServerClass *pSVar5;
pSVar4 = param_1;
if (param_1 != (ServerClass *)0x0) {
do {
DataTable_ClearWriteFlags_R(*(SendTable **)(pSVar4 + 4));
pSVar1 = pSVar4 + 8;
pSVar5 = param_1;
pSVar4 = *(ServerClass **)pSVar1;
} while (*(ServerClass **)pSVar1 != (ServerClass *)0x0);
do {
while (((byte)(*(SendTable **)(pSVar5 + 4))[0x10] & 2) != 0) {
pSVar4 = pSVar5 + 8;
pSVar5 = *(ServerClass **)pSVar4;
if (*(ServerClass **)pSVar4 == (ServerClass *)0x0) goto LAB_00144948;
}
DataTable_MaybeWriteSendTableBuffer(*(SendTable **)(pSVar5 + 4),param_2,true);
pSVar4 = pSVar5 + 8;
pSVar5 = *(ServerClass **)pSVar4;
} while (*(ServerClass **)pSVar4 != (ServerClass *)0x0);
LAB_00144948:
do {
DataTable_MaybeWriteSendTableBuffer_R(*(SendTable **)(param_1 + 4),param_2);
param_1 = *(ServerClass **)(param_1 + 8);
} while (param_1 != (ServerClass *)0x0);
}
iVar2 = *(int *)(param_2 + 0xc);
if (iVar2 < *(int *)(param_2 + 8)) {
if (param_2[0x10] == (bf_write)0x0) {
pbVar3 = (byte *)((iVar2 >> 3) + *(int *)param_2);
*pbVar3 = *pbVar3 & ~(byte)(1 << ((byte)iVar2 & 7));
*(int *)(param_2 + 0xc) = *(int *)(param_2 + 0xc) + 1;
return;
}
}
else {
param_2[0x10] = (bf_write)0x1;
}
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.