CPointScriptUseTarget::StopUse
0x00902420 · 576 bytes · __thiscall
_ZN21CPointScriptUseTarget7StopUseEv
Decompiled
undefined (1 param)
/* CPointScriptUseTarget::StopUse() */
longdouble __thiscall CPointScriptUseTarget::StopUse(CPointScriptUseTarget *this)
{
float fVar1;
uint uVar2;
CCSPlayer *this_00;
CBaseEdict *this_01;
int *piVar3;
char cVar4;
int iVar5;
undefined *puVar6;
longdouble lVar7;
void *local_30;
void *local_28;
undefined4 local_24;
undefined2 local_20;
ushort local_1e;
uVar2 = *(uint *)(this + 0x478);
if ((((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) &&
(this_00 = *(CCSPlayer **)(puVar6 + 4), this_00 != (CCSPlayer *)0x0)) {
fVar1 = *(float *)(gpGlobals + 0xc);
lVar7 = (longdouble)CCSPlayer::GetProgressBarStartTime(this_00);
local_30 = (void *)(fVar1 - (float)lVar7);
cVar4 = CTerrorPlayer::IsAdrenalineActive((CTerrorPlayer *)this_00);
piVar3 = g_pScriptVM;
if (cVar4 != '\0') {
local_30 = (void *)((float)local_30 + (float)local_30);
}
if ((*(int *)(this + 0x46c) != 0) && (this[0x474] == (CPointScriptUseTarget)0x0)) {
this[0x474] = (CPointScriptUseTarget)0x1;
local_20 = 1;
local_1e = 0;
local_24 = 0;
local_28 = local_30;
/* try { // try from 0090253b to 0090253d has its CatchHandler @ 00902676 */
(**(code **)(*piVar3 + 0x50))
(piVar3,*(int *)(this + 0x46c),&local_28,1,0,*(undefined4 *)(this + 1000),1);
if ((local_1e & 1) != 0) {
free(local_28);
}
this[0x474] = (CPointScriptUseTarget)0x0;
}
CTerrorPlayer::StopUseActions((CTerrorPlayer *)this_00);
uVar2 = *(uint *)(this_00 + 0x1d14);
if (((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar6 + 8) == uVar2 >> 0xc && (*(int *)(puVar6 + 4) != 0)))) {
if (this_00[0x6c] == (CCSPlayer)0x0) {
this_01 = *(CBaseEdict **)(this_00 + 0x30);
if (this_01 != (CBaseEdict *)0x0) {
*(uint *)this_01 = *(uint *)this_01 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(this_01);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this_00[0x70] = (CCSPlayer)((byte)this_00[0x70] | 1);
}
*(undefined4 *)(this_00 + 0x1d14) = 0xffffffff;
}
(**(code **)(*(int *)this_00 + 0x76c))(this_00);
piVar3 = g_pScriptVM;
local_20 = 5;
*(undefined4 *)(this + 0x478) = 0xffffffff;
local_1e = 0;
local_28 = (void *)0x0;
/* try { // try from 009025da to 009025dc has its CatchHandler @ 00902688 */
(**(code **)(*piVar3 + 0x78))(piVar3,*(undefined4 *)(this + 1000),"PlayerUsingMe",&local_28);
if ((local_1e & 1) != 0) {
free(local_28);
}
CBaseEntity::SetNextThink((CBaseEntity *)this,-1.0,(char *)0x0);
return (longdouble)(float)local_30;
}
return (longdouble)0.0;
}
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.