CTerrorGameMovement::LedgeMove
0x004fcf00 · 1035 bytes · __thiscall
_ZN19CTerrorGameMovement9LedgeMoveEv
Decompiled
undefined (1 param)
/* CTerrorGameMovement::LedgeMove() */
void __thiscall CTerrorGameMovement::LedgeMove(CTerrorGameMovement *this)
{
float fVar1;
float fVar2;
float fVar3;
int iVar4;
CTerrorPlayer *pCVar5;
uint uVar6;
CBaseEntity *this_00;
int iVar7;
char cVar8;
CTerrorPlayer *pCVar9;
undefined *puVar10;
CTerrorPlayer *this_01;
longdouble lVar11;
float fVar12;
float fVar13;
float fVar14;
float local_40;
float local_3c;
float local_38;
QAngle local_34 [4];
float local_30;
uint local_28;
uint local_24;
uint local_20;
iVar4 = *(int *)(this + 8);
*(undefined4 *)(iVar4 + 0x40) = 0;
*(undefined4 *)(iVar4 + 0x44) = 0;
*(undefined4 *)(iVar4 + 0x48) = 0;
pCVar5 = *(CTerrorPlayer **)(this + 0x810);
if (pCVar5[0x39f1] == (CTerrorPlayer)0x0) {
CBaseEntity::SetMoveType(*(CBaseEntity **)(this + 4),2,0);
return;
}
uVar6 = *(uint *)(pCVar5 + 0x3a48);
this_01 = pCVar5;
if ((((uVar6 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar6 >> 0xc)) &&
(this_00 = *(CBaseEntity **)(puVar10 + 4), this_00 != (CBaseEntity *)0x0)) {
pCVar9 = pCVar5;
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
pCVar9 = *(CTerrorPlayer **)(this + 0x810);
}
this_01 = pCVar9;
if (((*(float *)(pCVar5 + 0x3a4c) == *(float *)(this_00 + 0x2e0)) &&
(*(float *)(pCVar5 + 0x3a50) == *(float *)(this_00 + 0x2e4))) &&
(*(float *)(pCVar5 + 0x3a54) == *(float *)(this_00 + 0x2e8))) {
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
this_01 = *(CTerrorPlayer **)(this + 0x810);
}
if (((*(float *)(pCVar9 + 0x3a58) == *(float *)(this_00 + 0x37c)) &&
(*(float *)(pCVar9 + 0x3a5c) == *(float *)(this_00 + 0x380))) &&
(*(float *)(pCVar9 + 0x3a60) == *(float *)(this_00 + 900))) {
if (this_01[0x39f1] == (CTerrorPlayer)0x0) {
LAB_004fd058:
iVar4 = *(int *)(this + 8);
fVar1 = *(float *)(this_01 + 0x3a0c);
fVar2 = *(float *)(this_01 + 0x3a10);
fVar3 = *(float *)(this_01 + 0x3a08);
fVar12 = *(float *)(iVar4 + 0xa0) - fVar1;
fVar13 = *(float *)(iVar4 + 0xa4) - fVar2;
fVar14 = *(float *)(iVar4 + 0x9c) - fVar3;
if (SQRT(fVar13 * fVar13 + fVar14 * fVar14 + fVar12 * fVar12) <= 1.0) {
*(float *)(iVar4 + 0x9c) = fVar3;
*(undefined4 *)(iVar4 + 0xa0) = *(undefined4 *)(this_01 + 0x3a0c);
*(undefined4 *)(iVar4 + 0xa4) = *(undefined4 *)(this_01 + 0x3a10);
return;
}
*(float *)(iVar4 + 0x9c) = fVar3 * 0.8 + *(float *)(iVar4 + 0x9c) * 0.19999999;
*(float *)(iVar4 + 0xa0) = fVar1 * 0.8 + *(float *)(iVar4 + 0xa0) * 0.19999999;
*(float *)(iVar4 + 0xa4) = fVar2 * 0.8 + *(float *)(iVar4 + 0xa4) * 0.19999999;
return;
}
if (0.0 < *(float *)(this_01 + 0x39f8)) {
lVar11 = (longdouble)IntervalTimer::Now();
pCVar5 = this_01 + 0x39f8;
this_01 = *(CTerrorPlayer **)(this + 0x810);
if ((float)lVar11 - *(float *)pCVar5 < 1.0) goto LAB_004fd058;
}
cVar8 = CTerrorPlayerAnimState::IsClimbingLedge
(*(CTerrorPlayerAnimState **)(this_01 + 0x2910));
if (cVar8 != '\0') {
(**(code **)(**(int **)(*(int *)(this + 0x810) + 0x2910) + 0x78))
(*(int **)(*(int *)(this + 0x810) + 0x2910),(Vector *)&local_40);
(**(code **)(**(int **)(*(int *)(this + 0x810) + 0x2910) + 0x7c))
(*(int **)(*(int *)(this + 0x810) + 0x2910));
iVar4 = *(int *)(this + 0x810);
local_20 = *(uint *)(iVar4 + 0x3a28) ^ 0x80000000;
local_24 = *(uint *)(&DAT_00003a24 + iVar4) ^ 0x80000000;
local_28 = *(uint *)(iVar4 + 0x3a20) ^ 0x80000000;
VectorAngles((Vector *)&local_28,local_34);
VectorYawRotate((Vector *)&local_40,local_30,(Vector *)&local_40);
iVar4 = *(int *)(this + 8);
*(float *)(iVar4 + 0xa0) = local_3c + *(float *)(iVar4 + 0xa0);
*(float *)(iVar4 + 0x9c) = *(float *)(iVar4 + 0x9c) + local_40;
*(float *)(iVar4 + 0xa4) = local_38 + *(float *)(iVar4 + 0xa4);
return;
}
iVar4 = *(int *)(this + 0x810);
iVar7 = *(int *)(this + 8);
*(undefined4 *)(iVar7 + 0x9c) = *(undefined4 *)(iVar4 + 0x3a08);
*(undefined4 *)(iVar7 + 0xa0) = *(undefined4 *)(iVar4 + 0x3a0c);
*(undefined4 *)(iVar7 + 0xa4) = *(undefined4 *)(iVar4 + 0x3a10);
return;
}
}
}
CTerrorPlayer::OnLedgeMoved(this_01);
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.