CTankClaw::OnSwingEnd
0x0055deb0 · 418 bytes · __thiscall
_ZN9CTankClaw10OnSwingEndEb
Decompiled
undefined (2 params)
/* CTankClaw::OnSwingEnd(bool) */
void __thiscall CTankClaw::OnSwingEnd(CTankClaw *this,bool param_1)
{
uint uVar1;
CBaseEntity *this_00;
CBaseEdict *this_01;
bool bVar2;
bool bVar3;
char cVar4;
int iVar5;
undefined *puVar6;
int iVar7;
longdouble lVar8;
float fVar9;
float local_28;
if (this[0x17f0] != (CTankClaw)0x0) {
if (this[0x6c] == (CTankClaw)0x0) {
this_01 = *(CBaseEdict **)(this + 0x30);
if (this_01 != (CBaseEdict *)0x0) {
*(uint *)this_01 = *(uint *)this_01 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(this_01);
*(undefined2 *)(iVar7 + 2) = 0;
}
}
else {
this[0x70] = (CTankClaw)((byte)this[0x70] | 1);
}
this[0x17f0] = (CTankClaw)0x0;
}
if (!param_1) {
local_28 = *(float *)(HulkSwingInterval._28_4_ + 0x2c) -
*(float *)(HulkSwingMissInterval._28_4_ + 0x2c);
iVar7 = CTerrorWeapon::GetAttackTimer((CTerrorWeapon *)this);
fVar9 = *(float *)(iVar7 + 8);
lVar8 = (longdouble)CountdownTimer::Now();
fVar9 = fVar9 - (float)lVar8;
LAB_0055dfb4:
CTerrorWeapon::StartAttackTimer((CTerrorWeapon *)this,fVar9 - local_28);
return;
}
iVar7 = 0;
bVar3 = false;
if (0 < *(int *)(this + 0x1788)) {
do {
uVar1 = *(uint *)(this + iVar7 * 4 + 0x1588);
if ((((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) &&
((this_00 = *(CBaseEntity **)(puVar6 + 4), this_00 != (CBaseEntity *)0x0 &&
(cVar4 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar4 != '\0')))) {
iVar5 = CBaseEntity::GetTeamNumber(this_00);
if (iVar5 != 3) {
bVar2 = false;
goto LAB_0055df56;
}
bVar3 = true;
}
iVar7 = iVar7 + 1;
} while (iVar7 < *(int *)(this + 0x1788));
bVar2 = true;
LAB_0055df56:
if ((bVar3) && (bVar2)) {
local_28 = *(float *)(HulkSwingInterval._28_4_ + 0x2c) -
*(float *)(HulkSwingFastInterval._28_4_ + 0x2c);
iVar7 = CTerrorWeapon::GetAttackTimer((CTerrorWeapon *)this);
fVar9 = *(float *)(iVar7 + 8);
lVar8 = (longdouble)CountdownTimer::Now();
fVar9 = fVar9 - (float)lVar8;
goto LAB_0055dfb4;
}
}
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.