CopyPropState
0x0014ec70 · 194 bytes · __regparm3
_ZL13CopyPropStateP12CRecvDecoderiP7bf_readP16CDeltaBitsWriter
Decompiled
undefined (4 params)
/* CopyPropState(CRecvDecoder*, int, bf_read*, CDeltaBitsWriter*) */
void __regparm3
CopyPropState(CRecvDecoder *param_1,int param_2,bf_read *param_3,CDeltaBitsWriter *param_4)
{
int iVar1;
int iVar2;
iVar2 = *(int *)(*(int *)(param_1 + 0x34) + param_2 * 4);
if (*(int *)(param_3 + 0x20) == 0) {
iVar1 = 0;
}
else {
iVar1 = (((uint)(*(int *)(param_3 + 0x18) - *(int *)(param_3 + 0x20)) >> 2) * 0x20 -
*(int *)(param_3 + 0x14)) + (*(uint *)(param_3 + 0xc) & 3) * 8;
if (*(int *)(param_3 + 8) < iVar1) {
iVar1 = *(int *)(param_3 + 8);
}
}
(**(code **)(g_PropTypeFns + *(int *)(iVar2 + 8) * 0x24 + 0x20))(iVar2,param_3);
if (*(int *)(param_3 + 0x20) == 0) {
iVar2 = 0;
}
else {
iVar2 = (((uint)(*(int *)(param_3 + 0x18) - *(int *)(param_3 + 0x20)) >> 2) * 0x20 -
*(int *)(param_3 + 0x14)) + (*(uint *)(param_3 + 0xc) & 3) * 8;
if (*(int *)(param_3 + 8) < iVar2) {
iVar2 = *(int *)(param_3 + 8);
}
}
CBitRead::Seek((CBitRead *)param_3,iVar1);
CDeltaBitsWriter::WritePropIndex(param_4,param_2);
bf_write::WriteBitsFromBuffer(*(bf_write **)param_4,param_3,iVar2 - iVar1);
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.