CTerrorPlayer::OnStartHangingFromTongue
0x00842d50 · 750 bytes · __thiscall
_ZN13CTerrorPlayer24OnStartHangingFromTongueEi
Decompiled
undefined (2 params)
/* CTerrorPlayer::OnStartHangingFromTongue(int) */
void __thiscall CTerrorPlayer::OnStartHangingFromTongue(CTerrorPlayer *this,int param_1)
{
float fVar1;
CBaseEdict *this_00;
code *pcVar2;
uint uVar3;
int iVar4;
int *piVar5;
undefined4 uVar6;
CTerrorPlayer *this_01;
undefined *puVar7;
longdouble lVar8;
*(uint *)(this + 0x33e0) = *(uint *)(this + 0x33e0) | param_1;
if (this[0x33dc] != (CTerrorPlayer)0x1) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
this[0x33dc] = (CTerrorPlayer)0x1;
iVar4 = GetActiveTerrorWeapon(this);
if (iVar4 != 0) {
piVar5 = (int *)GetActiveTerrorWeapon(this);
(**(code **)(*piVar5 + 0x428))(piVar5,0);
}
fVar1 = *(float *)(TongueChokeDamageInterval._28_4_ + 0x2c);
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + fVar1 != *(float *)(this + 0x33f0)) {
(**(code **)(*(int *)(this + 0x33e8) + 4))(this + 0x33e8,this + 0x33f0);
*(float *)(this + 0x33f0) = (float)lVar8 + fVar1;
}
if (fVar1 != *(float *)(this + 0x33ec)) {
(**(code **)(*(int *)(this + 0x33e8) + 4))(this + 0x33e8,this + 0x33ec);
*(float *)(this + 0x33ec) = fVar1;
}
lVar8 = (longdouble)IntervalTimer::Now();
if ((float)lVar8 != *(float *)(this + 0x33f8)) {
(**(code **)(*(int *)(this + 0x33f4) + 4))(this + 0x33f4,this + 0x33f8);
*(float *)(this + 0x33f8) = (float)lVar8;
}
if (*(float *)(this + 0x3408) != -1.0) {
(**(code **)(*(int *)(this + 0x3400) + 4))(this + 0x3400,this + 0x3408);
*(undefined4 *)(this + 0x3408) = 0xbf800000;
}
(**(code **)(*(int *)(this + 0x3ab4) + 0xa0))(this + 0x3ab4);
piVar5 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"choke_start",0,0);
if (piVar5 != (int *)0x0) {
iVar4 = 0;
pcVar2 = *(code **)(*piVar5 + 0x30);
uVar3 = *(uint *)(this + 0x33c4);
if (((uVar3 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar3 >> 0xc)) {
iVar4 = *(int *)(puVar7 + 4);
}
uVar6 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(iVar4 + 0x30));
(*pcVar2)(piVar5,"userid",uVar6);
pcVar2 = *(code **)(*piVar5 + 0x30);
uVar6 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
(*pcVar2)(piVar5,"victim",uVar6);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar5,0);
}
uVar3 = *(uint *)(this + 0x33c4);
this_01 = (CTerrorPlayer *)0x0;
if (((uVar3 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar3 >> 0xc)) {
this_01 = *(CTerrorPlayer **)(puVar7 + 4);
}
AbilityDebug(this_01,this,"Tongue choke starting.");
ElectHeroicSurvivorBot(this);
return;
}
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.