JockeyLeap::Update
0x00ab5640 · 1399 bytes · __thiscall
_ZN10JockeyLeap6UpdateEP6Jockeyf
Decompiled
undefined (3 params)
/* JockeyLeap::Update(Jockey*, float) */
JockeyLeap * __thiscall JockeyLeap::Update(JockeyLeap *this,Jockey *param_1,float param_2)
{
float fVar1;
char cVar2;
CBaseEntity *this_00;
float *pfVar3;
int *piVar4;
int *piVar5;
undefined *puVar6;
CBaseEntity *this_01;
undefined *puVar7;
uint uVar8;
longdouble lVar9;
float fVar10;
float fVar11;
float fVar12;
int *local_30;
float local_28;
float local_24;
float local_20;
uVar8 = *(uint *)(param_1 + 0x34);
if ((((uVar8 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar8 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar8 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)) {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Lost our victim";
}
else {
lVar9 = (longdouble)CountdownTimer::Now();
puVar7 = g_pEntityList;
if ((float)lVar9 < *(float *)(param_1 + 0x5c)) {
LAB_00ab5a80:
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
return this;
}
uVar8 = *(uint *)((int)param_2 + 0x30bc);
if (((uVar8 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar8 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar6 + 8) != uVar8 >> 0xc || (*(int *)(puVar6 + 4) == 0)))) {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "No custom ability!";
}
else {
piVar5 = (int *)__dynamic_cast(*(int *)(puVar6 + 4),&CBaseAbility::typeinfo,&CLeap::typeinfo,0
);
if (piVar5 != (int *)0x0) {
if (param_1[0x50] == (Jockey)0x0) {
cVar2 = (**(code **)(*piVar5 + 0x32c))(piVar5);
if (cVar2 == '\0') {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Not ready yet";
return this;
}
uVar8 = *(uint *)(param_1 + 0x34);
this_00 = (CBaseEntity *)0x0;
if (((uVar8 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar8 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar7 + 8) == uVar8 >> 0xc)) {
this_00 = *(CBaseEntity **)(puVar7 + 4);
}
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
}
this_01 = (CBaseEntity *)0x0;
fVar10 = *(float *)((int)param_2 + 0x2e4) - *(float *)(this_00 + 0x2e4);
fVar12 = *(float *)((int)param_2 + 0x2e8) - *(float *)(this_00 + 0x2e8);
fVar11 = *(float *)((int)param_2 + 0x2e0) - *(float *)(this_00 + 0x2e0);
uVar8 = *(uint *)(param_1 + 0x34);
fVar10 = SQRT(fVar10 * fVar10 + fVar12 * fVar12 + fVar11 * fVar11) * 0.0025;
if (((uVar8 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar8 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar7 + 8) == uVar8 >> 0xc)) {
this_01 = *(CBaseEntity **)(puVar7 + 4);
}
if (((byte)this_01[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity(this_01);
uVar8 = *(uint *)(param_1 + 0x34);
}
fVar11 = *(float *)(this_01 + 0x274);
local_30 = (int *)0x0;
fVar12 = *(float *)(this_01 + 0x278);
fVar1 = *(float *)(this_01 + 0x27c);
if (((uVar8 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar8 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar7 + 8) == uVar8 >> 0xc)) {
local_30 = *(int **)(puVar7 + 4);
}
pfVar3 = (float *)(**(code **)(*local_30 + 0x288))(local_30);
local_28 = fVar11 * fVar10 + *pfVar3;
local_24 = fVar12 * fVar10 + pfVar3[1];
local_20 = fVar10 * fVar1 + pfVar3[2];
piVar4 = (int *)(**(code **)(*(int *)param_2 + 0x9b4))(param_2);
(**(code **)(*piVar4 + 0xc0))(piVar4,&local_28,0,0,0,0,1,0x3e800000);
pfVar3 = (float *)(**(code **)(*(int *)param_2 + 0x288))(param_2);
fVar10 = pfVar3[1];
fVar11 = *pfVar3;
piVar5[0x126] = (int)(local_20 - pfVar3[2]);
piVar5[0x125] = (int)(local_24 - fVar10);
piVar5[0x124] = (int)(local_28 - fVar11);
(**(code **)(*piVar5 + 0x330))(piVar5);
piVar5[0x124] = vec3_origin;
piVar5[0x125] = DAT_01053d4c;
piVar5[0x126] = DAT_01053d50;
param_1[0x50] = (Jockey)0x1;
if (*(float *)(param_1 + 0x5c) != -1.0) {
(**(code **)(*(int *)(param_1 + 0x54) + 4))(param_1 + 0x54,param_1 + 0x5c);
*(undefined4 *)(param_1 + 0x5c) = 0xbf800000;
}
lVar9 = (longdouble)CountdownTimer::Now();
if ((float)lVar9 + 0.4 != *(float *)(param_1 + 0x68)) {
(**(code **)(*(int *)(param_1 + 0x60) + 4))(param_1 + 0x60,param_1 + 0x68);
*(float *)(param_1 + 0x68) = (float)lVar9 + 0.4;
}
if (*(float *)(param_1 + 100) != 0.4) {
(**(code **)(*(int *)(param_1 + 0x60) + 4))(param_1 + 0x60,param_1 + 100);
*(undefined4 *)(param_1 + 100) = 0x3ecccccd;
}
}
else {
uVar8 = *(uint *)((int)param_2 + 0x3edc);
if (((uVar8 != 0xffffffff) &&
(puVar7 = puVar7 + (uVar8 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar7 + 8) == uVar8 >> 0xc && (*(int *)(puVar7 + 4) != 0)))) {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Attached";
return this;
}
piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x9b0))(param_2);
cVar2 = (**(code **)(*piVar5 + 0xf8))(piVar5);
if ((cVar2 != '\0') &&
(lVar9 = (longdouble)CountdownTimer::Now(), *(float *)(param_1 + 0x68) <= (float)lVar9)
) {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Landed";
return this;
}
}
goto LAB_00ab5a80;
}
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Ability isn\'t leap!";
}
}
return this;
}
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.