CTerrorPlayer::GetFlinchEvent
0x009a1b70 · 230 bytes · __thiscall
_ZN13CTerrorPlayer14GetFlinchEventERK15CTakeDamageInfo
Decompiled
undefined (2 params)
/* CTerrorPlayer::GetFlinchEvent(CTakeDamageInfo const&) */
char __thiscall CTerrorPlayer::GetFlinchEvent(CTerrorPlayer *this,CTakeDamageInfo *param_1)
{
char cVar1;
int iVar2;
longdouble lVar3;
float local_24;
float local_20;
float local_1c;
QAngle local_18 [4];
float local_14;
local_24 = *(float *)param_1;
local_20 = *(float *)(param_1 + 4);
local_1c = *(float *)(param_1 + 8);
if ((((local_24 <= -0.01) || (0.01 <= local_24)) || (local_20 <= -0.01)) ||
(((0.01 <= local_20 || (local_1c <= -0.01)) || (cVar1 = '9', 0.01 <= local_1c)))) {
VectorNormalize((Vector *)&local_24);
VectorAngles((Vector *)&local_24,local_18);
iVar2 = (**(code **)(*(int *)this + 0x238))(this);
lVar3 = (longdouble)AngleNormalize((180.0 - local_14) + *(float *)(iVar2 + 4));
cVar1 = (90.0 <= ABS((float)lVar3)) + '9';
}
return cVar1;
}
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.