RemapViewAngles
0x00583960 · 370 bytes · __cdecl
_Z15RemapViewAnglesP19ViewSmoothingData_tR6QAngle
Decompiled
undefined (2 params)
/* RemapViewAngles(ViewSmoothingData_t*, QAngle&) */
void RemapViewAngles(ViewSmoothingData_t *param_1,QAngle *param_2)
{
float fVar1;
longdouble lVar2;
longdouble lVar3;
float local_30;
undefined4 local_24;
undefined4 local_20 [4];
lVar2 = (longdouble)
RemapAngleRange(*(float *)(param_1 + 8),*(float *)(param_1 + 0xc),*(float *)param_2,
(RemapAngleRange_CurvePart_t *)&local_24);
lVar3 = (longdouble)AngleNormalize(*(float *)(param_2 + 8));
fVar1 = (float)lVar3;
*(float *)(param_2 + 8) = fVar1;
if (ABS(*(float *)param_2) <= 60.0) {
local_30 = 1.0;
}
else {
local_30 = (ABS((float)lVar2) + -60.0) * 0.05;
if (1.0 <= local_30) {
local_30 = 1.0;
}
if (local_30 <= 0.0) {
local_30 = 0.0;
}
local_30 = 1.0 - local_30;
}
lVar3 = (longdouble)
RemapAngleRange(*(float *)(param_1 + 0x10),*(float *)(param_1 + 0x14),fVar1,
(RemapAngleRange_CurvePart_t *)local_20);
lVar2 = (longdouble)ApplyViewLocking(*(undefined4 *)param_2,(float)lVar2,param_1 + 0x1c,local_24);
*(float *)param_2 = (float)lVar2;
lVar2 = (longdouble)
ApplyViewLocking(*(undefined4 *)(param_2 + 8),((float)lVar3 - fVar1) * local_30 + fVar1,
param_1 + 0x2c,local_20[0]);
*(float *)(param_2 + 8) = (float)lVar2;
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.