CTerrorGameMovement::CheckParameters
0x004f9f30 · 2233 bytes · __thiscall
_ZN19CTerrorGameMovement15CheckParametersEv
Decompiled
undefined (1 param)
/* CTerrorGameMovement::CheckParameters() */
void __thiscall CTerrorGameMovement::CheckParameters(CTerrorGameMovement *this)
{
float fVar1;
int iVar2;
char cVar3;
byte bVar4;
int iVar5;
uint uVar6;
undefined *puVar7;
undefined *puVar8;
int *piVar9;
CBaseEntity *pCVar10;
longdouble lVar11;
float fVar12;
CTongue *local_20;
if (*(int *)(this + 0x810) == 0) {
CCSGameMovement::CheckParameters((CCSGameMovement *)this);
return;
}
CCSGameMovement::MaintainAutoDuckJump((CCSGameMovement *)this);
pCVar10 = *(CBaseEntity **)(this + 0x810);
iVar5 = CBaseEntity::GetTeamNumber(pCVar10);
if (iVar5 == 3) {
iVar5 = (**(code **)(*(int *)pCVar10 + 0x544))(pCVar10);
pCVar10 = *(CBaseEntity **)(this + 0x810);
if ((((iVar5 != 1) || (uVar6 = *(uint *)(pCVar10 + 0x30bc), uVar6 == 0xffffffff)) ||
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar7 + 8) != uVar6 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) goto LAB_004f9f6f;
local_20 = (CTongue *)
__dynamic_cast(*(int *)(puVar7 + 4),&CBaseAbility::typeinfo,&CTongue::typeinfo,0);
}
else {
pCVar10 = *(CBaseEntity **)(this + 0x810);
LAB_004f9f6f:
local_20 = (CTongue *)0x0;
}
iVar5 = CBaseEntity::GetTeamNumber(pCVar10);
piVar9 = *(int **)(this + 0x810);
if (iVar5 == 3) {
cVar3 = (**(code **)(*piVar9 + 0x778))(piVar9);
if (cVar3 == '\0') {
pCVar10 = *(CBaseEntity **)(this + 0x810);
iVar5 = CBaseEntity::GetTeamNumber(pCVar10);
if (iVar5 == 3) {
iVar5 = (**(code **)(*(int *)pCVar10 + 0x544))(pCVar10);
piVar9 = *(int **)(this + 0x810);
if ((iVar5 != 7) || (piVar9[0xba2] == 2)) goto LAB_004f9f8d;
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) | 4;
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffffffd;
}
}
piVar9 = *(int **)(this + 0x810);
}
LAB_004f9f8d:
cVar3 = (**(code **)(*piVar9 + 0x910))(piVar9);
if (cVar3 == '\0') {
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffffffd;
}
piVar9 = *(int **)(this + 0x810);
uVar6 = piVar9[0xb89];
if ((((uVar6 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar6 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)) {
cVar3 = (**(code **)(*piVar9 + 0x7e8))(piVar9);
if (cVar3 != '\0') {
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffff1cd;
*(undefined4 *)(*(int *)(this + 8) + 0x34) = 0;
*(undefined4 *)(*(int *)(this + 8) + 0x30) = 0;
cVar3 = CTerrorPlayer::CanCrawl();
if (cVar3 == '\0') {
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffffff7;
*(undefined4 *)(*(int *)(this + 8) + 0x2c) = 0;
}
else {
iVar5 = *(int *)(this + 8);
if (*(float *)(iVar5 + 0x2c) <= 0.0 && *(float *)(iVar5 + 0x2c) != 0.0) {
*(undefined4 *)(iVar5 + 0x2c) = 0;
iVar5 = *(int *)(this + 8);
}
lVar11 = (longdouble)CTerrorPlayer::GetCrawlTopSpeed();
*(float *)(iVar5 + 0x3c) = (float)lVar11;
}
goto LAB_004fa203;
}
pCVar10 = *(CBaseEntity **)(this + 0x810);
uVar6 = *(uint *)(pCVar10 + 0x2e28);
if (((uVar6 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar7 + 8) != uVar6 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) {
LAB_004fa023:
uVar6 = *(uint *)(pCVar10 + 0x30bc);
if ((((uVar6 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar6 >> 0xc)) &&
(piVar9 = *(int **)(puVar7 + 4), piVar9 != (int *)0x0)) {
lVar11 = (longdouble)(**(code **)(*piVar9 + 0x36c))(piVar9);
puVar7 = g_pEntityList;
if (0.0 <= (float)lVar11) {
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffdfffb;
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) | 8;
uVar6 = *(uint *)(*(int *)(this + 0x810) + 0x30bc);
if (uVar6 == 0xffffffff) {
uVar6 = 0xffffffff;
}
else {
puVar8 = puVar7 + (uVar6 & 0xfff) * 0x10;
if (((puVar8 != (undefined *)0xfffffffc) && (*(uint *)(puVar8 + 8) == uVar6 >> 0xc)) &&
(piVar9 = *(int **)(puVar8 + 4), piVar9 != (int *)0x0)) {
lVar11 = (longdouble)(**(code **)(*piVar9 + 0x370))(piVar9);
if (-1.0 < (float)lVar11) {
pCVar10 = *(CBaseEntity **)(this + 0x810);
iVar5 = CBaseEntity::GetTeamNumber(pCVar10);
if ((iVar5 == 3) &&
(iVar5 = (**(code **)(*(int *)pCVar10 + 0x544))(pCVar10), iVar5 == 6)) {
*(uint *)(*(int *)(this + 8) + 0x24) =
*(uint *)(*(int *)(this + 8) + 0x24) & 0xfffff1c1;
*(undefined4 *)(*(int *)(this + 8) + 0x2c) = 0;
*(undefined4 *)(*(int *)(this + 8) + 0x34) = 0;
*(undefined4 *)(*(int *)(this + 8) + 0x30) = 0;
}
piVar9 = (int *)0x0;
iVar5 = *(int *)(this + 8);
uVar6 = *(uint *)(*(int *)(this + 0x810) + 0x30bc);
if (((uVar6 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10,
puVar7 != (undefined *)0xfffffffc)) && (*(uint *)(puVar7 + 8) == uVar6 >> 0xc))
{
piVar9 = *(int **)(puVar7 + 4);
}
lVar11 = (longdouble)(**(code **)(*piVar9 + 0x370))(piVar9);
*(float *)(iVar5 + 0x3c) = (float)lVar11;
}
uVar6 = *(uint *)(*(int *)(this + 0x810) + 0x30bc);
puVar7 = g_pEntityList;
}
}
piVar9 = (int *)0x0;
iVar5 = *(int *)(this + 8);
if (((uVar6 != 0xffffffff) &&
(puVar7 = puVar7 + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar6 >> 0xc)) {
piVar9 = *(int **)(puVar7 + 4);
}
lVar11 = (longdouble)(**(code **)(*piVar9 + 0x36c))(piVar9);
*(float *)(iVar5 + 0x2c) = (float)lVar11;
goto LAB_004fa203;
}
pCVar10 = *(CBaseEntity **)(this + 0x810);
}
uVar6 = *(uint *)(pCVar10 + 0x3e68);
if ((((uVar6 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar7 + 8) == uVar6 >> 0xc && (*(int *)(puVar7 + 4) != 0)))) ||
((((uVar6 = *(uint *)(pCVar10 + 0x3e48), uVar6 != 0xffffffff &&
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar6 >> 0xc)) && (*(int *)(puVar7 + 4) != 0)))) {
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) | 4;
goto LAB_004fa1db;
}
uVar6 = *(uint *)(pCVar10 + 0x3e64);
if (((uVar6 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar7 + 8) != uVar6 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) {
uVar6 = *(uint *)(pCVar10 + 0x3edc);
if ((((uVar6 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar7 + 8) != uVar6 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)) {
uVar6 = *(uint *)(pCVar10 + 0x3ee0);
if ((((uVar6 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar7 + 8) == uVar6 >> 0xc)) && (*(int *)(puVar7 + 4) != 0)) {
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0x618;
goto LAB_004fa203;
}
uVar6 = *(uint *)(pCVar10 + 0x3e44);
if (((uVar6 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc))
|| ((*(uint *)(puVar7 + 8) != uVar6 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) {
iVar5 = CBaseEntity::GetTeamNumber(pCVar10);
if (((iVar5 == 3) &&
(iVar5 = (**(code **)(*(int *)pCVar10 + 0x544))(pCVar10), iVar5 == 1)) &&
((local_20 != (CTongue *)0x0 &&
(cVar3 = CTongue::IsTongueActive(local_20), cVar3 != '\0')))) {
*(uint *)(*(int *)(this + 8) + 0x24) =
*(uint *)(*(int *)(this + 8) + 0x24) & 0xfffffff9;
}
else {
iVar5 = *(int *)(this + 8);
iVar2 = *(int *)(this + 4);
uVar6 = *(uint *)(iVar5 + 0x24);
if ((((uVar6 & 4) == 0) && (*(char *)(iVar2 + 0x1a91) == '\0')) &&
((*(byte *)(iVar2 + 0x150) & 2) == 0)) {
if ((uVar6 & 0x20000) == 0) {
if ((2 < *(byte *)(iVar2 + 0x253)) && (*(char *)(iVar2 + 0x186) != '\b')) {
*(uint *)(iVar5 + 0x24) = uVar6 & 0xfffff7fc;
}
goto LAB_004fa203;
}
lVar11 = (longdouble)
CTerrorPlayer::GetWalkTopSpeed(*(CTerrorPlayer **)(this + 0x810));
fVar12 = (float)lVar11;
}
else {
if (*(char *)(iVar2 + 0x186) == '\b') goto LAB_004fa203;
if (*(CTerrorPlayer **)(this + 0x810) == (CTerrorPlayer *)0x0) {
fVar12 = *(float *)(ZombieCrouchSpeed._28_4_ + 0x2c);
}
else {
lVar11 = (longdouble)
CTerrorPlayer::GetCrouchTopSpeed(*(CTerrorPlayer **)(this + 0x810));
iVar5 = *(int *)(this + 8);
fVar12 = (float)lVar11;
}
}
*(float *)(iVar5 + 0x3c) = fVar12;
}
goto LAB_004fa203;
}
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffff9c1;
}
else {
*(float *)(pCVar10 + 0x3ee8) =
*(float *)(*(int *)(this + 8) + 0x2c) / *(float *)(*(int *)(this + 8) + 0x3c);
*(float *)(*(int *)(this + 0x810) + 0x3eec) =
*(float *)(*(int *)(this + 8) + 0x30) / *(float *)(*(int *)(this + 8) + 0x3c);
piVar9 = *(int **)(this + 0x810);
iVar5 = (**(code **)(*piVar9 + 0x238))(piVar9);
piVar9[0xfbc] = *(int *)(iVar5 + 4);
piVar9 = *(int **)(this + 0x810);
fVar12 = (float)piVar9[0xfba];
fVar1 = (float)piVar9[0xfbb];
if (((fVar12 != (float)piVar9[0xfc2]) || (fVar1 != (float)piVar9[0xfc3])) ||
((float)piVar9[0xfc4] != 0.0)) {
CServerNetworkProperty::NetworkStateChanged((short)piVar9 + 0x24);
piVar9[0xfc4] = 0;
piVar9[0xfc2] = (int)fVar12;
piVar9[0xfc3] = (int)fVar1;
piVar9 = *(int **)(this + 0x810);
}
bVar4 = (**(code **)(*piVar9 + 0x778))(piVar9);
iVar5 = *(int *)(this + 0x810);
if ((bVar4 ^ 1) != *(byte *)(iVar5 + 0x3f14)) {
CServerNetworkProperty::NetworkStateChanged((short)iVar5 + 0x24);
*(byte *)(iVar5 + 0x3f14) = bVar4 ^ 1;
}
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffff9c0;
}
}
else {
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) | 4;
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffff9c4;
}
}
else {
lVar11 = (longdouble)CTerrorPlayer::GetProgressBarPercent((CTerrorPlayer *)pCVar10);
if ((0.1 <= (float)lVar11) || (*(int *)(SurvivorReviveContinuousFire._28_4_ + 0x30) != 0)) {
pCVar10 = *(CBaseEntity **)(this + 0x810);
goto LAB_004fa023;
}
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffff9e7;
}
}
else {
LAB_004fa1db:
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffff1c5;
}
*(undefined4 *)(*(int *)(this + 8) + 0x2c) = 0;
*(undefined4 *)(*(int *)(this + 8) + 0x34) = 0;
*(undefined4 *)(*(int *)(this + 8) + 0x30) = 0;
LAB_004fa203:
CCSGameMovement::ComputeSpeeds((CCSGameMovement *)this);
CCSGameMovement::ComputeAngles((CCSGameMovement *)this);
/* WARNING: Could not recover jumptable at 0x004fa225. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)this + 0x11c))();
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.