CTerrorPlayerAnimState::GetTurnRate
0x00513bb0 · 311 bytes · __thiscall
_ZN22CTerrorPlayerAnimState11GetTurnRateEv
Decompiled
undefined (1 param)
/* CTerrorPlayerAnimState::GetTurnRate() */
longdouble __thiscall CTerrorPlayerAnimState::GetTurnRate(CTerrorPlayerAnimState *this)
{
uint uVar1;
CBaseEntity *this_00;
char cVar2;
undefined4 uVar3;
int iVar4;
undefined *puVar5;
longdouble lVar6;
float fVar7;
if ((((((&DAT_000039f1)[*(int *)(this + 0x118)] == '\0') &&
(*(char *)(*(int *)(this + 0x118) + 0x186) != '\t')) &&
(this[0x167] == (CTerrorPlayerAnimState)0x0)) &&
(((this[0x164] == (CTerrorPlayerAnimState)0x0 && (this[0x159] == (CTerrorPlayerAnimState)0x0))
&& ((this[0x15d] == (CTerrorPlayerAnimState)0x0 &&
(cVar2 = IsChainsawing(this), cVar2 == '\0')))))) &&
(((uVar1 = *(uint *)(*(int *)(this + 0x118) + 0x2a4c), uVar1 == 0xffffffff ||
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar5 + 8) != uVar1 >> 0xc || (*(int *)(puVar5 + 4) == 0)))))) {
uVar3 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
cVar2 = CTerrorPlayer::IsMotionControlledZ(*(CTerrorPlayer **)(this + 0x118),uVar3);
if (cVar2 == '\0') {
this_00 = *(CBaseEntity **)(this + 0x118);
iVar4 = CBaseEntity::GetTeamNumber(this_00);
if (((iVar4 == 3) && (iVar4 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar4 == 8)) ||
(lVar6 = (longdouble)CMultiPlayerAnimState::GetOuterXYSpeed((CMultiPlayerAnimState *)this),
0.5 < (float)lVar6)) {
return (longdouble)2.0;
}
fVar7 = 1.0;
goto LAB_00513be8;
}
}
fVar7 = 5.0;
LAB_00513be8:
return (longdouble)fVar7;
}
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.