CTerrorPlayer::GetWalkTopSpeed
0x004f2df0 · 471 bytes · __thiscall
_ZNK13CTerrorPlayer15GetWalkTopSpeedEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::GetWalkTopSpeed() const */
longdouble __thiscall CTerrorPlayer::GetWalkTopSpeed(CTerrorPlayer *this)
{
uint uVar1;
char cVar2;
int iVar3;
int *piVar4;
undefined *puVar5;
longdouble lVar6;
float fVar7;
if (this[0x104] != (CTerrorPlayer)0x0) {
LAB_004f2e5b:
lVar6 = (longdouble)GetRunTopSpeed(this);
return lVar6;
}
iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar2 = IsASurvivorTeam(iVar3);
if (cVar2 == '\0') {
iVar3 = (**(code **)(*(int *)this + 0x544))(this);
if (iVar3 != 3) {
if (iVar3 == 8) {
uVar1 = *(uint *)(this + 0x30bc);
if (((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar5 + 8) == uVar1 >> 0xc &&
((piVar4 = *(int **)(puVar5 + 4), piVar4 != (int *)0x0 &&
(lVar6 = (longdouble)(**(code **)(*piVar4 + 0x36c))(piVar4), 0.0 <= (float)lVar6))))))
{
uVar1 = *(uint *)(this + 0x30bc);
if ((uVar1 == 0xffffffff) ||
((puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc ||
(*(uint *)(puVar5 + 8) != uVar1 >> 0xc)))) {
piVar4 = (int *)0x0;
}
else {
piVar4 = *(int **)(puVar5 + 4);
}
/* WARNING: Could not recover jumptable at 0x004f2f28. Too many branches */
/* WARNING: Treating indirect jump as call */
lVar6 = (longdouble)(**(code **)(*piVar4 + 0x36c))();
return lVar6;
}
fVar7 = *(float *)(ZombieHulkWalkSpeed._28_4_ + 0x2c);
}
else {
fVar7 = *(float *)(ZombieWalkSpeed._28_4_ + 0x2c);
}
goto LAB_004f2f4a;
}
}
else {
uVar1 = *(uint *)(this + 0x33c4);
if (((((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar5 + 4) != 0)) ||
(iVar3 = GetStaggerDir(this), iVar3 != 0)) goto LAB_004f2e5b;
if ((this[0x3278] == (CTerrorPlayer)0x0) && (this[0x32fc] != (CTerrorPlayer)0x0)) {
lVar6 = (longdouble)(**(code **)(*(int *)this + 0x7e4))(this);
if (((float)lVar6 <= 0.0) && (*(int *)(this + 0x100) < 2)) {
fVar7 = *(float *)(SurvivorFumesWalkSpeed._28_4_ + 0x2c);
goto LAB_004f2f4a;
}
if (this[0x32fc] != (CTerrorPlayer)0x0) {
fVar7 = *(float *)(SurvivorLimpWalkSpeed._28_4_ + 0x2c);
goto LAB_004f2f4a;
}
}
}
fVar7 = 85.0;
LAB_004f2f4a:
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.