CTerrorGameMovement::FullCustomMove
0x00500750 · 882 bytes · __thiscall
_ZN19CTerrorGameMovement14FullCustomMoveEv
Decompiled
undefined (1 param)
/* CTerrorGameMovement::FullCustomMove() */
void __thiscall CTerrorGameMovement::FullCustomMove(CTerrorGameMovement *this)
{
CBaseEntity *this_00;
char cVar1;
undefined4 uVar2;
int iVar3;
longdouble lVar4;
float fVar5;
float local_24;
float local_20;
float local_1c;
float local_18;
float local_14;
float local_10;
iVar3 = *(int *)(this + 0x810);
if (iVar3 == 0) goto LAB_005008e0;
if ((&DAT_000039f1)[iVar3] != '\0') {
LedgeMove(this);
return;
}
uVar2 = CMultiPlayerAnimState::GetMainActivity(*(CMultiPlayerAnimState **)(iVar3 + 0x2910));
cVar1 = CTerrorPlayer::IsMotionControlledXY(*(CTerrorPlayer **)(this + 0x810),uVar2);
if (cVar1 == '\0') {
uVar2 = CMultiPlayerAnimState::GetMainActivity
(*(CMultiPlayerAnimState **)(*(int *)(this + 0x810) + 0x2910));
cVar1 = CTerrorPlayer::IsMotionControlledZ(*(CTerrorPlayer **)(this + 0x810),uVar2);
if (cVar1 != '\0') goto LAB_0050079e;
}
else {
LAB_0050079e:
iVar3 = CTerrorPlayer::GetStaggerDir(*(CTerrorPlayer **)(this + 0x810));
if (iVar3 == 0) {
(**(code **)(**(int **)(*(int *)(this + 0x810) + 0x2910) + 0x78))
(*(int **)(*(int *)(this + 0x810) + 0x2910),&local_24);
(**(code **)(**(int **)(*(int *)(this + 0x810) + 0x2910) + 0x7c))
(*(int **)(*(int *)(this + 0x810) + 0x2910));
this_00 = *(CBaseEntity **)(this + 0x810);
iVar3 = CBaseEntity::GetTeamNumber(this_00);
if ((iVar3 == 3) && (iVar3 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar3 == 8)) {
iVar3 = CMultiPlayerAnimState::GetMainActivity
(*(CMultiPlayerAnimState **)(*(int *)(this + 0x810) + 0x2910));
if ((iVar3 - 0x2d0U < 0x11) && ((1 << ((byte)(iVar3 - 0x2d0U) & 0x1f) & 0x14a15U) != 0)) {
iVar3 = *(int *)(this + 8);
*(float *)(iVar3 + 0xa0) = *(float *)(iVar3 + 0xa0) + local_20;
*(float *)(iVar3 + 0xa4) = *(float *)(iVar3 + 0xa4) + local_1c;
*(float *)(iVar3 + 0x9c) = *(float *)(iVar3 + 0x9c) + local_24;
fVar5 = 1.0 / *(float *)(gpGlobals + 0x10);
iVar3 = *(int *)(this + 8);
*(float *)(iVar3 + 0x40) = local_24 * fVar5;
*(float *)(iVar3 + 0x44) = local_20 * fVar5;
*(float *)(iVar3 + 0x48) = fVar5 * local_1c;
goto LAB_005009ac;
}
}
lVar4 = (longdouble)(**(code **)(*(int *)this + 0x38))(this);
iVar3 = *(int *)(this + 8);
local_18 = local_24 + *(float *)(iVar3 + 0x9c);
local_14 = local_20 + *(float *)(iVar3 + 0xa0);
local_10 = local_1c + *(float *)(iVar3 + 0xa4);
UpdatePosition(this,(Vector *)&local_18,(float)lVar4);
LAB_005009ac:
uVar2 = CMultiPlayerAnimState::GetMainActivity
(*(CMultiPlayerAnimState **)(*(int *)(this + 0x810) + 0x2910));
cVar1 = CTerrorPlayer::IsMotionControlledZ(*(CTerrorPlayer **)(this + 0x810),uVar2);
if (cVar1 == '\0') {
CGameMovement::StayOnGround((CGameMovement *)this);
}
(**(code **)(*(int *)this + 0xcc))(this,0);
return;
}
}
cVar1 = CTerrorPlayer::IsStaggering(*(CTerrorPlayer **)(this + 0x810));
if (cVar1 != '\0') {
(**(code **)(**(int **)(*(int *)(this + 0x810) + 0x2910) + 0x78))
(*(int **)(*(int *)(this + 0x810) + 0x2910),&local_24);
(**(code **)(**(int **)(*(int *)(this + 0x810) + 0x2910) + 0x7c))
(*(int **)(*(int *)(this + 0x810) + 0x2910));
lVar4 = (longdouble)(**(code **)(*(int *)this + 0x38))(this);
iVar3 = *(int *)(this + 8);
local_18 = local_24 + *(float *)(iVar3 + 0x9c);
local_14 = local_20 + *(float *)(iVar3 + 0xa0);
local_10 = local_1c + *(float *)(iVar3 + 0xa4);
UpdatePosition(this,(Vector *)&local_18,(float)lVar4);
CGameMovement::StayOnGround((CGameMovement *)this);
(**(code **)(*(int *)this + 0xcc))(this,0);
iVar3 = CBaseEntity::GetGroundEntity(*(CBaseEntity **)(this + 0x810));
if (iVar3 == 0) {
CTerrorPlayer::CancelStagger(*(CTerrorPlayer **)(this + 0x810));
}
return;
}
LAB_005008e0:
CBaseEntity::SetMoveType(*(CBaseEntity **)(this + 4),2,0);
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.