Vector_CompareDeltas
0x00148230 · 322 bytes · __cdecl
_Z20Vector_CompareDeltasPK8SendPropP7bf_readS3_
Decompiled
undefined (3 params)
/* Vector_CompareDeltas(SendProp const*, bf_read*, bf_read*) */
uint Vector_CompareDeltas(SendProp *param_1,bf_read *param_2,bf_read *param_3)
{
int iVar1;
undefined4 *puVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
uVar3 = Float_CompareDeltas(param_1,param_2,param_3);
uVar4 = Float_CompareDeltas(param_1,param_2,param_3);
if (((byte)param_1[0x3c] & 0x20) == 0) {
uVar5 = Float_CompareDeltas(param_1,param_2,param_3);
goto LAB_001482fc;
}
iVar1 = *(int *)(param_2 + 0x14);
uVar5 = *(uint *)(param_2 + 0x10);
*(int *)(param_2 + 0x14) = iVar1 + -1;
if (iVar1 + -1 == 0) {
puVar2 = *(undefined4 **)(param_2 + 0x18);
*(undefined4 *)(param_2 + 0x14) = 0x20;
if (puVar2 == *(undefined4 **)(param_2 + 0x1c)) {
*(undefined4 *)(param_2 + 0x14) = 1;
*(undefined4 *)(param_2 + 0x10) = 0;
*(undefined4 **)(param_2 + 0x18) = puVar2 + 1;
goto LAB_00148288;
}
if (puVar2 <= *(undefined4 **)(param_2 + 0x1c)) {
*(undefined4 **)(param_2 + 0x18) = puVar2 + 1;
*(undefined4 *)(param_2 + 0x10) = *puVar2;
goto LAB_00148288;
}
param_2[4] = (bf_read)0x1;
*(undefined4 *)(param_2 + 0x10) = 0;
iVar1 = *(int *)(param_3 + 0x14);
uVar6 = *(uint *)(param_3 + 0x10);
*(int *)(param_3 + 0x14) = iVar1 + -1;
if (iVar1 + -1 != 0) goto LAB_001482f0;
LAB_00148298:
puVar2 = *(undefined4 **)(param_3 + 0x18);
*(undefined4 *)(param_3 + 0x14) = 0x20;
if (puVar2 == *(undefined4 **)(param_3 + 0x1c)) {
*(undefined4 *)(param_3 + 0x14) = 1;
*(undefined4 *)(param_3 + 0x10) = 0;
*(undefined4 **)(param_3 + 0x18) = puVar2 + 1;
}
else if (*(undefined4 **)(param_3 + 0x1c) < puVar2) {
param_3[4] = (bf_read)0x1;
*(undefined4 *)(param_3 + 0x10) = 0;
}
else {
*(undefined4 **)(param_3 + 0x18) = puVar2 + 1;
*(undefined4 *)(param_3 + 0x10) = *puVar2;
}
}
else {
*(uint *)(param_2 + 0x10) = uVar5 >> 1;
LAB_00148288:
iVar1 = *(int *)(param_3 + 0x14);
uVar6 = *(uint *)(param_3 + 0x10);
*(int *)(param_3 + 0x14) = iVar1 + -1;
if (iVar1 + -1 == 0) goto LAB_00148298;
LAB_001482f0:
*(uint *)(param_3 + 0x10) = uVar6 >> 1;
}
uVar5 = (uVar5 ^ uVar6) & 1;
LAB_001482fc:
return uVar3 | uVar4 | uVar5;
}
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.