WriteUserCmdDeltaAngle
0x0057adf0 · 158 bytes · __regparm3
_ZL22WriteUserCmdDeltaAngleP8bf_writePcffi.isra.10
Decompiled
undefined (5 params)
/* WriteUserCmdDeltaAngle(bf_write*, char*, float, float, int) [clone .isra.10] */
undefined4 __regparm3
WriteUserCmdDeltaAngle(bf_write *param_1,char *param_2,float param_3,float param_4,int param_5)
{
int iVar1;
byte *pbVar2;
float in_XMM0_Da;
float in_XMM1_Da;
iVar1 = *(int *)(param_1 + 0xc);
if (in_XMM0_Da != in_XMM1_Da) {
if (iVar1 < *(int *)(param_1 + 8)) {
if (param_1[0x10] == (bf_write)0x0) {
pbVar2 = (byte *)((iVar1 >> 3) + *(int *)param_1);
*pbVar2 = *pbVar2 | (byte)(1 << ((byte)iVar1 & 7));
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + 1;
}
}
else {
param_1[0x10] = (bf_write)0x1;
}
bf_write::WriteBitAngle(param_1,in_XMM1_Da,(int)param_2);
return 1;
}
if (*(int *)(param_1 + 8) <= iVar1) {
param_1[0x10] = (bf_write)0x1;
return 0;
}
if (param_1[0x10] == (bf_write)0x0) {
pbVar2 = (byte *)((iVar1 >> 3) + *(int *)param_1);
*pbVar2 = *pbVar2 & ~(byte)(1 << ((byte)iVar1 & 7));
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + 1;
}
return 0;
}
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.