HunterLungeAtVictim::Update
0x00aa0310 · 851 bytes · __thiscall
_ZN19HunterLungeAtVictim6UpdateEP6Hunterf
Decompiled
undefined (3 params)
/* HunterLungeAtVictim::Update(Hunter*, float) */
HunterLungeAtVictim * __thiscall
HunterLungeAtVictim::Update(HunterLungeAtVictim *this,Hunter *param_1,float param_2)
{
uint uVar1;
char cVar2;
undefined4 *puVar3;
undefined *puVar4;
int *piVar5;
longdouble lVar6;
undefined4 local_20;
uVar1 = *(uint *)(param_1 + 0x34);
if ((((uVar1 == 0xffffffff) ||
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)) {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Lost our victim";
return this;
}
uVar1 = *(uint *)((int)param_2 + 0x30bc);
if (((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar4 + 8) == uVar1 >> 0xc &&
(piVar5 = *(int **)(puVar4 + 4), piVar5 != (int *)0x0)))) {
(**(code **)(*(int *)param_2 + 0x980))(param_2,0xbf800000);
lVar6 = (longdouble)CountdownTimer::Now();
if (*(float *)(param_1 + 0x50) <= (float)lVar6) {
if ((param_1[0x44] == (Hunter)0x0) &&
(cVar2 = (**(code **)(*piVar5 + 0x32c))(piVar5), cVar2 != '\0')) {
(**(code **)(*(int *)param_2 + 0x938))(param_2,0xbf800000);
param_1[0x44] = (Hunter)0x1;
if (*(float *)(param_1 + 0x50) != -1.0) {
(**(code **)(*(int *)(param_1 + 0x48) + 4))(param_1 + 0x48,param_1 + 0x50);
*(undefined4 *)(param_1 + 0x50) = 0xbf800000;
}
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + 1.0 != *(float *)(param_1 + 0x5c)) {
(**(code **)(*(int *)(param_1 + 0x54) + 4))(param_1 + 0x54,param_1 + 0x5c);
*(float *)(param_1 + 0x5c) = (float)lVar6 + 1.0;
}
if (*(float *)(param_1 + 0x58) != 1.0) {
(**(code **)(*(int *)(param_1 + 0x54) + 4))(param_1 + 0x54,param_1 + 0x58);
*(undefined4 *)(param_1 + 0x58) = 0x3f800000;
}
}
uVar1 = *(uint *)(param_1 + 0x34);
piVar5 = (int *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
piVar5 = *(int **)(puVar4 + 4);
}
puVar3 = (undefined4 *)(**(code **)(*piVar5 + 0x288))(piVar5);
*(undefined4 *)(param_1 + 0x38) = *puVar3;
*(undefined4 *)(param_1 + 0x3c) = puVar3[1];
*(undefined4 *)(param_1 + 0x40) = puVar3[2];
piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x9b0))(param_2);
(**(code **)(*piVar5 + 0xb4))(piVar5,param_1 + 0x38,0x3f800000);
}
piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x9b4))(param_2);
local_20 = 0;
uVar1 = *(uint *)(param_1 + 0x34);
if (((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
local_20 = *(undefined4 *)(puVar4 + 4);
}
(**(code **)(*piVar5 + 0xc4))(piVar5,local_20,0,0,0,0,1,0x3e800000);
if ((param_1[0x44] != (Hunter)0x0) &&
(lVar6 = (longdouble)CountdownTimer::Now(), *(float *)(param_1 + 0x5c) <= (float)lVar6)) {
piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x9b0))(param_2);
cVar2 = (**(code **)(*piVar5 + 0xf8))(piVar5);
if (cVar2 != '\0') {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Landed";
return this;
}
}
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
return this;
}
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "No vomit ability!";
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.