CTerrorPlayerAnimState::CalculateLadderDismount
0x00513380 · 1263 bytes · __thiscall
_ZN22CTerrorPlayerAnimState23CalculateLadderDismountEv
Decompiled
undefined (1 param)
/* CTerrorPlayerAnimState::CalculateLadderDismount() */
longdouble __thiscall CTerrorPlayerAnimState::CalculateLadderDismount(CTerrorPlayerAnimState *this)
{
float fVar1;
float fVar2;
CBaseEntity *this_00;
float fVar3;
uint uVar4;
int *piVar5;
int iVar6;
CBaseEntity *pCVar7;
float fVar8;
float fVar9;
float fVar10;
float fVar11;
float fVar12;
float fVar13;
float fVar14;
float fVar15;
float fVar16;
float local_100;
float local_f4;
float local_f0;
float local_ec;
float local_e8;
float local_e4;
float local_e0;
undefined **local_dc [4];
float local_cc;
float local_c8;
float local_c4;
float local_bc;
float local_b8;
undefined4 local_b4;
float local_ac;
float local_a8;
float local_a4;
float local_9c;
float local_98;
float local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
Vector local_70 [12];
Vector local_64 [32];
float local_44;
byte local_3d;
short local_30;
this_00 = *(CBaseEntity **)(this + 0x118);
fVar10 = vec3_origin - *(float *)(this_00 + 0x28d4);
fVar8 = DAT_01053d4c - *(float *)(this_00 + 0x28d8);
pCVar7 = this_00;
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
pCVar7 = *(CBaseEntity **)(this + 0x118);
}
fVar1 = *(float *)(this_00 + 0x2e0);
fVar10 = fVar10 * 64.0;
fVar8 = fVar8 * 64.0;
fVar2 = *(float *)(this_00 + 0x2e8);
fVar3 = *(float *)(this_00 + 0x2e4);
(**(code **)(*(int *)pCVar7 + 0x5b0))(&local_f4,pCVar7);
(**(code **)(**(int **)(this + 0x118) + 0x5b4))(&local_e8,*(int **)(this + 0x118));
fVar15 = local_e0 + fVar2 + -1.0;
if (fVar2 <= fVar15) {
fVar16 = (local_e8 - local_f4) * 0.5;
fVar11 = (local_e4 - local_f0) * 0.5;
fVar13 = (1.0 - local_ec) * 0.5;
fVar14 = (local_e8 + local_f4) * 0.5;
fVar12 = (local_f0 + local_e4) * 0.5;
fVar9 = (local_ec + 1.0) * 0.5;
local_100 = fVar15;
do {
local_100 = local_100 - 1.0;
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)local_dc,(IHandleEntity *)0x0,0,
(_func_bool_IHandleEntity_ptr_int *)0x0);
local_dc[0] = &PTR_ShouldHitEntity_00c54558;
uVar4 = (**(code **)(**(int **)(this + 0x118) + 0x7a0))(*(int **)(this + 0x118),0);
local_b4 = 0;
local_8c = 0;
local_c4 = fVar9 + local_100;
local_cc = fVar1 + fVar14;
local_c8 = fVar3 + fVar12;
local_bc = fVar10;
local_b8 = fVar8;
local_ac = -fVar14;
local_a8 = -fVar12;
local_a4 = -fVar9;
local_9c = fVar16;
local_98 = fVar11;
local_94 = fVar13;
local_88 = fVar11 * fVar11 + fVar16 * fVar16 + fVar13 * fVar13 < 1e-06;
local_87 = fVar10 * fVar10 + fVar8 * fVar8 != 0.0;
(**(code **)(*enginetrace + 0x14))
(enginetrace,&local_cc,uVar4 & 0xfffcffff,(CTraceFilterSimple *)local_dc,local_70);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,local_64,0xff,0xff,0,true,-1.0);
}
if ((local_44 < 1.0) &&
(((local_3d & 0x20) != 0 ||
(((piVar5 = (int *)(**(code **)(*IMoveHelper::sm_pSingleton + 0x30))
(IMoveHelper::sm_pSingleton), piVar5 != (int *)0x0 &&
(iVar6 = (**(code **)(*piVar5 + 0x18))(piVar5,(int)local_30), iVar6 != 0)) &&
(*(char *)(iVar6 + 0x4e) != '\0')))))) {
fVar8 = (fVar15 - local_100) / (fVar15 - fVar2);
goto LAB_005137dd;
}
} while (fVar2 <= local_100);
}
fVar8 = 0.0;
LAB_005137dd:
return (longdouble)fVar8;
}
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.