CTerrorPlayer::OnReleasedByTongue
0x00843f40 · 1145 bytes · __thiscall
_ZN13CTerrorPlayer18OnReleasedByTongueEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::OnReleasedByTongue() */
void __thiscall CTerrorPlayer::OnReleasedByTongue(CTerrorPlayer *this)
{
uint uVar1;
CBaseEdict *pCVar2;
int iVar3;
undefined *puVar4;
int iVar5;
longdouble lVar6;
float fVar7;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
if (((byte)this[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
}
local_28 = *(undefined4 *)(this + 0x274);
local_20 = 0;
local_24 = *(undefined4 *)(this + 0x278);
CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&local_28);
uVar1 = *(uint *)(this + 0x33c4);
if ((((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) && (iVar5 = *(int *)(puVar4 + 4), iVar5 != 0)) {
fVar7 = *(float *)(this + 0x33cc);
if (fVar7 <= 0.0) goto LAB_00843fba;
lVar6 = (longdouble)IntervalTimer::Now();
fVar7 = *(float *)(this + 0x33cc);
if ((int)((float)lVar6 - fVar7) <= *(int *)(iVar5 + 0x39d4)) goto LAB_00843fba;
if (*(char *)(iVar5 + 0x6c) == '\0') {
pCVar2 = *(CBaseEdict **)(iVar5 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
*(byte *)(iVar5 + 0x70) = *(byte *)(iVar5 + 0x70) | 1;
}
*(int *)(iVar5 + 0x39d4) = (int)((float)lVar6 - fVar7);
}
fVar7 = *(float *)(this + 0x33cc);
LAB_00843fba:
if (fVar7 != -1.0) {
(**(code **)(*(int *)(this + 0x33c8) + 4))(this + 0x33c8,this + 0x33cc);
*(undefined4 *)(this + 0x33cc) = 0xbf800000;
}
*(undefined4 *)(this + 0x3298) = *(undefined4 *)(this + 0x33c4);
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + 3.0 != *(float *)(this + 0x3294)) {
(**(code **)(*(int *)(this + 0x328c) + 4))(this + 0x328c,this + 0x3294);
*(float *)(this + 0x3294) = (float)lVar6 + 3.0;
}
if (*(float *)(this + 0x3290) != 3.0) {
(**(code **)(*(int *)(this + 0x328c) + 4))(this + 0x328c,this + 0x3290);
*(undefined4 *)(this + 0x3290) = 0x40400000;
}
*(undefined4 *)(this + 0x17fc) = 0x3f800000;
OnStopHangingFromTongue(this,3);
if ((g_pEntityList == (undefined *)0xfffffffc) || (*(int *)(g_pEntityList + 8) != 0)) {
iVar5 = 0;
}
else {
iVar5 = *(int *)(g_pEntityList + 4);
}
uVar1 = *(uint *)(this + 0x33c4);
if (((uVar1 == 0xffffffff) ||
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) {
iVar3 = 0;
}
else {
iVar3 = *(int *)(puVar4 + 4);
}
if (iVar5 != iVar3) {
if (this[0x6c] == (CTerrorPlayer)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] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x33c4) = 0;
}
if (this[0x33e4] != (CTerrorPlayer)0x0) {
if (this[0x6c] == (CTerrorPlayer)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] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
this[0x33e4] = (CTerrorPlayer)0x0;
}
fVar7 = (float)*(int *)(TongueReleaseFatiguePenalty._28_4_ + 0x30) + *(float *)(this + 0x2848);
if (*(float *)(this + 0x2848) != fVar7) {
if (this[0x6c] == (CTerrorPlayer)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] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(float *)(this + 0x2848) = fVar7;
}
(**(code **)(*(int *)this + 0x81c))(this);
if (*(float *)(this + 0x33f0) != -1.0) {
(**(code **)(*(int *)(this + 0x33e8) + 4))(this + 0x33e8,this + 0x33f0);
*(undefined4 *)(this + 0x33f0) = 0xbf800000;
}
if (*(float *)(this + 0x3408) != -1.0) {
(**(code **)(*(int *)(this + 0x3400) + 4))(this + 0x3400,this + 0x3408);
*(undefined4 *)(this + 0x3408) = 0xbf800000;
}
(**(code **)(*(int *)(this + 0x3ab4) + 0xa4))(this + 0x3ab4);
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + 2.0 != *(float *)(this + 0x2e68)) {
(**(code **)(*(int *)(this + 0x2e60) + 4))(this + 0x2e60,this + 0x2e68);
*(float *)(this + 0x2e68) = (float)lVar6 + 2.0;
}
if (*(float *)(this + 0x2e64) != 2.0) {
(**(code **)(*(int *)(this + 0x2e60) + 4))(this + 0x2e60,this + 0x2e64);
*(undefined4 *)(this + 0x2e64) = 0x40000000;
}
CBasePlayer::RumbleEffect((CBasePlayer *)this,'%','\0','\x01');
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.