CTerrorPlayer::IsImmobilized
0x004f6630 · 814 bytes · __thiscall
_ZNK13CTerrorPlayer13IsImmobilizedEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::IsImmobilized() const */
undefined4 __thiscall CTerrorPlayer::IsImmobilized(CTerrorPlayer *this)
{
uint uVar1;
char cVar2;
int iVar3;
undefined4 uVar4;
int *piVar5;
undefined *puVar6;
longdouble lVar7;
float fVar8;
cVar2 = (**(code **)(*(int *)this + 0x7e8))(this);
if (cVar2 != '\0') {
return 1;
}
cVar2 = IsPlayingDeathAnim(this);
if (cVar2 != '\0') {
return 1;
}
iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
uVar4 = IsASurvivorTeam(iVar3);
if ((char)uVar4 != '\0') {
uVar1 = *(uint *)(this + 0x3e68);
if ((((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) {
return 1;
}
uVar1 = *(uint *)(this + 0x3e48);
if (((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar6 + 8) == uVar1 >> 0xc && (*(int *)(puVar6 + 4) != 0)))) {
return 1;
}
uVar1 = *(uint *)(this + 0x33c4);
if (((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar6 + 8) == uVar1 >> 0xc && (*(int *)(puVar6 + 4) != 0)))) {
return 1;
}
uVar1 = *(uint *)(this + 0x2e28);
if ((((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) {
return 1;
}
if (*(int *)(this + 0x2b44) != 0) {
return 1;
}
iVar3 = CMultiPlayerAnimState::GetMainActivity(*(CMultiPlayerAnimState **)(this + 0x2910));
if (iVar3 < 0x213) {
if (0x210 < iVar3) {
return uVar4;
}
if (iVar3 - 0x209U < 6) {
return uVar4;
}
}
else if (iVar3 == 0x303) {
return uVar4;
}
fVar8 = 1.5;
if ((*(int *)(this + 0x3f28) != 2) && (fVar8 = 0.5, *(int *)(this + 0x3f28) != 0)) {
fVar8 = 0.75;
}
if ((0.0 < *(float *)(this + 0x3f30)) &&
(lVar7 = (longdouble)IntervalTimer::Now(), (float)lVar7 - *(float *)(this + 0x3f30) < fVar8))
{
return 1;
}
}
uVar1 = *(uint *)(this + 0x3e44);
if ((((((uVar1 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar6 + 4) == 0)) &&
((((((uVar1 = *(uint *)(this + 0x30bc), uVar1 == 0xffffffff ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar6 + 8) != uVar1 >> 0xc ||
((piVar5 = *(int **)(puVar6 + 4), piVar5 == (int *)0x0 ||
(cVar2 = (**(code **)(*piVar5 + 0x378))(piVar5), cVar2 != '\0')))))) &&
((piVar5 = (int *)CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this),
piVar5 == (int *)0x0 || (cVar2 = (**(code **)(*piVar5 + 0x67c))(piVar5), cVar2 != '\0'))))
&& (this[0x33bd] == (CTerrorPlayer)0x0)) &&
((((uVar1 = *(uint *)(this + 0x33a4), uVar1 == 0xffffffff ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar6 + 4) == 0)))))) &&
(*(float *)(this + 0x2848) <= 2000.0)) {
uVar4 = CCSPlayer::IsImmobilized((CCSPlayer *)this);
return uVar4;
}
return 1;
}
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.