CButtonTimed::StopUse
0x00635200 · 410 bytes · __thiscall
_ZN12CButtonTimed7StopUseEv
Decompiled
undefined (1 param)
/* CButtonTimed::StopUse() */
void __thiscall CButtonTimed::StopUse(CButtonTimed *this)
{
uint uVar1;
CBaseEntity *pCVar2;
CBaseEdict *this_00;
CTerrorPlayer *this_01;
int iVar3;
undefined *puVar4;
CBaseEntity *this_02;
undefined1 local_24 [20];
if (this[0x59d] != (CButtonTimed)0x0) {
uVar1 = *(uint *)(this + 0x494);
this_02 = (CBaseEntity *)this;
if ((((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
((*(int *)(puVar4 + 4) != 0 &&
(this_01 = (CTerrorPlayer *)
__dynamic_cast(*(int *)(puVar4 + 4),&CBaseEntity::typeinfo,
&CTerrorPlayer::typeinfo,0), this_01 != (CTerrorPlayer *)0x0)))) {
CTerrorPlayer::StopUseActions(this_01);
uVar1 = *(uint *)(this_01 + 0x1d14);
if (((uVar1 != 0xffffffff) &&
((puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)))) &&
(pCVar2 = *(CBaseEntity **)(puVar4 + 4), pCVar2 == (CBaseEntity *)this)) {
if (this_01[0x6c] == (CTerrorPlayer)0x0) {
this_00 = *(CBaseEdict **)(this_01 + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this_01[0x70] = (CTerrorPlayer)((byte)this_01[0x70] | 1);
}
*(undefined4 *)(this_01 + 0x1d14) = 0xffffffff;
(**(code **)(*(int *)this_01 + 0x76c))(this_01);
this_02 = pCVar2;
}
}
this[0x59d] = (CButtonTimed)0x0;
*(undefined4 *)(this + 0x5a0) = 0;
*(undefined4 *)(this + 0x494) = 0xffffffff;
COutputEvent::FireOutput((COutputEvent *)(this + 0x5a8),(CBaseEntity *)0x0,this_02,0.0);
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this_02,(char *)0x0);
CBaseEntity::SetNextThink(this_02,-1.0,(char *)0x0);
}
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.