CLeap::UpdateAbility
0x004d7c80 · 544 bytes · __thiscall
_ZN5CLeap13UpdateAbilityEv
Decompiled
undefined (1 param)
/* CLeap::UpdateAbility() */
void __thiscall CLeap::UpdateAbility(CLeap *this)
{
float fVar1;
uint uVar2;
CBaseEntity *this_00;
CBaseEdict *pCVar3;
int iVar4;
undefined *puVar5;
longdouble lVar6;
uVar2 = *(uint *)(this + 0x44c);
if (uVar2 == 0xffffffff) {
return;
}
puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10;
if (puVar5 == (undefined *)0xfffffffc) {
return;
}
if (*(uint *)(puVar5 + 8) != uVar2 >> 0xc) {
return;
}
this_00 = *(CBaseEntity **)(puVar5 + 4);
if (this_00 == (CBaseEntity *)0x0) {
return;
}
if (*(float *)(this + 0x470) <= -0.01) {
return;
}
if (0.01 <= *(float *)(this + 0x470)) {
return;
}
if (*(float *)(this + 0x474) <= -0.01) {
return;
}
if (0.01 <= *(float *)(this + 0x474)) {
return;
}
if (*(float *)(this + 0x478) <= -0.01) {
return;
}
if (0.01 <= *(float *)(this + 0x478)) {
return;
}
if (this[0x47c] == (CLeap)0x0) {
return;
}
if (this_00[0x186] != (CBaseEntity)0x9) {
iVar4 = CBaseEntity::GetGroundEntity(this_00);
if (iVar4 == 0) {
return;
}
if (*(float *)(gpGlobals + 0xc) <= *(float *)(this + 0x46c) + 0.3) {
return;
}
if (this[0x47c] == (CLeap)0x0) goto LAB_004d7d53;
}
if (this[0x6c] == (CLeap)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CLeap)((byte)this[0x70] | 1);
}
this[0x47c] = (CLeap)0x0;
LAB_004d7d53:
if (*(float *)(this + 0x46c) != 0.0) {
if (this[0x6c] == (CLeap)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CLeap)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x46c) = 0;
}
CBaseAbility::StartActivationTimer
((CBaseAbility *)this,*(float *)(ZombieLeapInterval._28_4_ + 0x2c),0.0);
fVar1 = *(float *)(ZombieLeapCooldown._28_4_ + 0x2c);
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + fVar1 != *(float *)(this + 0x488)) {
(**(code **)(*(int *)(this + 0x480) + 4))(this + 0x480,this + 0x488);
*(float *)(this + 0x488) = (float)lVar6 + fVar1;
}
if (fVar1 != *(float *)(this + 0x484)) {
(**(code **)(*(int *)(this + 0x480) + 4))(this + 0x480,this + 0x484);
*(float *)(this + 0x484) = fVar1;
}
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.