CTerrorPlayer::OnGrabbedByTongue
0x00845430 · 1149 bytes · __thiscall
_ZN13CTerrorPlayer17OnGrabbedByTongueEPS_
Decompiled
undefined (2 params)
/* CTerrorPlayer::OnGrabbedByTongue(CTerrorPlayer*) */
void __thiscall CTerrorPlayer::OnGrabbedByTongue(CTerrorPlayer *this,CTerrorPlayer *param_1)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
uint uVar7;
code *pcVar8;
CBaseEdict *pCVar9;
undefined4 uVar10;
int iVar11;
undefined *puVar12;
int iVar13;
longdouble lVar14;
uint local_24 [5];
lVar14 = (longdouble)IntervalTimer::Now();
if ((float)lVar14 != *(float *)(this + 0x33cc)) {
(**(code **)(*(int *)(this + 0x33c8) + 4))(this + 0x33c8,this + 0x33cc);
*(float *)(this + 0x33cc) = (float)lVar14;
}
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
fVar1 = *(float *)(this + 0x2e0);
fVar2 = *(float *)(this + 0x2e4);
fVar3 = *(float *)(param_1 + 0x2e0);
fVar4 = *(float *)(this + 0x2e8);
fVar5 = *(float *)(param_1 + 0x2e4);
fVar6 = *(float *)(param_1 + 0x2e8);
if (((fVar1 - fVar3 != *(float *)(this + 0x33d0)) || (fVar2 - fVar5 != *(float *)(this + 0x33d4)))
|| (fVar4 - fVar6 != *(float *)(this + 0x33d8))) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar9 = *(CBaseEdict **)(this + 0x30);
if (pCVar9 != (CBaseEdict *)0x0) {
*(uint *)pCVar9 = *(uint *)pCVar9 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar9);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(float *)(this + 0x33d0) = fVar1 - fVar3;
*(float *)(this + 0x33d4) = fVar2 - fVar5;
*(float *)(this + 0x33d8) = fVar4 - fVar6;
}
uVar7 = *(uint *)(this + 0x3ee0);
if (((uVar7 != 0xffffffff) &&
(puVar12 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar12 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar12 + 8) == uVar7 >> 0xc && (*(int *)(puVar12 + 4) != 0)))) {
OnRideEnded(this,(CTerrorPlayer *)0x0);
}
CBasePlayer::ClearUseEntity((CBasePlayer *)this);
CHandle<CTerrorPlayer>::CHandle((CHandle<CTerrorPlayer> *)local_24,param_1);
if (((local_24[0] == 0xffffffff) ||
(puVar12 = g_pEntityList + (local_24[0] & 0xfff) * 0x10, puVar12 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar12 + 8) != local_24[0] >> 0xc)) {
iVar13 = 0;
}
else {
iVar13 = *(int *)(puVar12 + 4);
}
uVar7 = *(uint *)(this + 0x33c4);
if (((uVar7 == 0xffffffff) ||
(puVar12 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar12 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar12 + 8) != uVar7 >> 0xc)) {
iVar11 = 0;
}
else {
iVar11 = *(int *)(puVar12 + 4);
}
if (iVar13 != iVar11) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar9 = *(CBaseEdict **)(this + 0x30);
if (pCVar9 != (CBaseEdict *)0x0) {
*(uint *)pCVar9 = *(uint *)pCVar9 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar9);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x33c4) = local_24[0];
}
uVar10 = TongueChokeDamageInterval._28_4_;
*(undefined4 *)(this + 0x17fc) = 0;
fVar1 = *(float *)(uVar10 + 0x2c);
lVar14 = (longdouble)CountdownTimer::Now();
if ((float)lVar14 + fVar1 != *(float *)(this + 0x3408)) {
(**(code **)(*(int *)(this + 0x3400) + 4))(this + 0x3400,this + 0x3408);
*(float *)(this + 0x3408) = (float)lVar14 + fVar1;
}
if (fVar1 != *(float *)(this + 0x3404)) {
(**(code **)(*(int *)(this + 0x3400) + 4))(this + 0x3400,this + 0x3404);
*(float *)(this + 0x3404) = fVar1;
}
CBaseEntity::EmitSound((CBaseEntity *)this,"SmokerZombie.TongueHit",0.0,(float *)0x0);
(**(code **)(*(int *)this + 0x81c))(this);
(**(code **)(*(int *)(this + 0x3ab4) + 0x9c))(this + 0x3ab4);
StopRevivingSomeone(this,false);
StopBeingRevived(this,false);
StopUseActions(this);
pcVar8 = *(code **)(*(int *)this + 0x7b4);
CAI_Concept::CAI_Concept((CAI_Concept *)local_24,"PlayerGrabbedByTongue");
(*pcVar8)(this,(CHandle<CTerrorPlayer> *)local_24,1,0,0,0,0);
fVar1 = *(float *)(gpGlobals + 0xc);
if (fVar1 != *(float *)(this + 0x3f24)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar9 = *(CBaseEdict **)(this + 0x30);
if (pCVar9 != (CBaseEdict *)0x0) {
*(uint *)pCVar9 = *(uint *)pCVar9 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar9);
*(undefined2 *)(iVar13 + 2) = 0;
}
*(float *)(this + 0x3f24) = fVar1;
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
*(float *)(this + 0x3f24) = fVar1;
}
}
CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&vec3_origin);
(**(code **)(*(int *)this + 0x7fc))(this,0x5c,0);
CBasePlayer::RumbleEffect((CBasePlayer *)this,'!','\0','\x04');
CBasePlayer::RumbleEffect((CBasePlayer *)this,'%','\0','\x02');
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.