CTerrorWeapon::ItemBusyFrame
0x00574520 · 756 bytes · __thiscall
_ZN13CTerrorWeapon13ItemBusyFrameEv
Decompiled
undefined (1 param)
/* CTerrorWeapon::ItemBusyFrame() */
void __thiscall CTerrorWeapon::ItemBusyFrame(CTerrorWeapon *this)
{
float fVar1;
CBaseEdict *pCVar2;
char cVar3;
int iVar4;
int iVar5;
uint uVar6;
undefined *puVar7;
longdouble lVar8;
CBaseCombatWeapon::ItemBusyFrame((CBaseCombatWeapon *)this);
iVar4 = GetPlayerOwner(this);
if (iVar4 == 0) {
return;
}
uVar6 = *(uint *)(iVar4 + 0x1cb0);
if ((this[0x1530] == (CTerrorWeapon)0x0) && ((uVar6 & 0x800) == 0)) {
if (this[0x6c] == (CTerrorWeapon)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorWeapon)((byte)this[0x70] | 1);
}
this[0x1530] = (CTerrorWeapon)0x1;
uVar6 = *(uint *)(iVar4 + 0x1cb0);
}
if (this[0x1531] == (CTerrorWeapon)0x0) {
if ((uVar6 & 1) == 0) {
if (this[0x6c] == (CTerrorWeapon)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorWeapon)((byte)this[0x70] | 1);
}
this[0x1531] = (CTerrorWeapon)0x1;
uVar6 = *(uint *)(iVar4 + 0x1cb0);
goto LAB_005745cb;
}
}
else {
LAB_005745cb:
if (((uVar6 & 1) == 0) && (this[0x1532] != (CTerrorWeapon)0x0)) {
if (this[0x6c] == (CTerrorWeapon)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorWeapon)((byte)this[0x70] | 1);
}
this[0x1532] = (CTerrorWeapon)0x0;
uVar6 = *(uint *)(iVar4 + 0x1cb0);
}
}
if (((uVar6 & 0x800) == 0) && (this[0x1533] != (CTerrorWeapon)0x0)) {
if (this[0x6c] == (CTerrorWeapon)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorWeapon)((byte)this[0x70] | 1);
}
this[0x1533] = (CTerrorWeapon)0x0;
}
lVar8 = (longdouble)CountdownTimer::Now();
if ((((float)lVar8 < *(float *)(iVar4 + 0x32dc)) ||
((((uVar6 = *(uint *)(iVar4 + 0x3e68), uVar6 != 0xffffffff &&
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar6 >> 0xc)) && (*(int *)(puVar7 + 4) != 0)))) ||
((((uVar6 = *(uint *)(iVar4 + 0x3e48), uVar6 != 0xffffffff &&
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar6 >> 0xc)) && (*(int *)(puVar7 + 4) != 0)))) {
if (this[0x1578] != (CTerrorWeapon)0x0) {
this[0x1578] = (CTerrorWeapon)0x0;
(**(code **)(*(int *)this + 0x6e0))(this,0 < *(int *)(this + 0x1788));
}
goto LAB_0057468a;
}
if (((*(byte *)(iVar4 + 0x1cb1) & 8) == 0) ||
(cVar3 = (**(code **)(*(int *)this + 0x680))(this), cVar3 == '\0')) {
LAB_00574676:
if (this[0x1459] == (CTerrorWeapon)0x0) goto LAB_0057468a;
}
else {
cVar3 = (**(code **)(*(int *)this + 0x684))(this);
if ((cVar3 != '\0') || (this[0x1459] == (CTerrorWeapon)0x0)) {
fVar1 = *(float *)(gpGlobals + 0xc);
if (fVar1 != *(float *)(iVar4 + 0x17dc)) {
if (*(char *)(iVar4 + 0x6c) == '\0') {
pCVar2 = *(CBaseEdict **)(iVar4 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)(iVar4 + 0x70) = *(byte *)(iVar4 + 0x70) | 1;
}
*(float *)(iVar4 + 0x17dc) = fVar1;
}
goto LAB_00574676;
}
}
(**(code **)(*(int *)this + 0x6fc))(this);
LAB_0057468a:
/* WARNING: Could not recover jumptable at 0x0057469c. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)this + 0x6f8))();
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.