CTerrorPlayer::NotifyTongueIsPulling
0x00844410 · 360 bytes · __thiscall
_ZN13CTerrorPlayer21NotifyTongueIsPullingEb
Decompiled
undefined (2 params)
/* CTerrorPlayer::NotifyTongueIsPulling(bool) */
void __thiscall CTerrorPlayer::NotifyTongueIsPulling(CTerrorPlayer *this,bool param_1)
{
CBaseEdict *this_00;
code *pcVar1;
uint uVar2;
int iVar3;
int *piVar4;
undefined *puVar5;
longdouble lVar6;
CAI_Concept local_24 [20];
if (this[0x33e4] != (CTerrorPlayer)param_1) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
this[0x33e4] = (CTerrorPlayer)param_1;
}
lVar6 = (longdouble)IntervalTimer::Now();
if (1.0 < (float)lVar6 - *(float *)(this + 0x33cc)) {
iVar3 = GetActiveTerrorWeapon(this);
if (iVar3 != 0) {
piVar4 = (int *)GetActiveTerrorWeapon(this);
(**(code **)(*piVar4 + 0x428))(piVar4,0);
}
}
if (this[0x33fc] != (CTerrorPlayer)0x0) {
return;
}
pcVar1 = *(code **)(*(int *)this + 0x7b4);
CAI_Concept::CAI_Concept(local_24,"PlayerTonguePullStart");
(*pcVar1)(this,local_24,1,0,0,0,0);
uVar2 = *(uint *)(this + 0x33c4);
if ((((uVar2 == 0xffffffff) ||
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar2 >> 0xc)) ||
(*(CBaseEntity **)(puVar5 + 4) == (CBaseEntity *)0x0)) {
this[0x33fc] = (CTerrorPlayer)0x1;
}
else {
CBaseEntity::EmitSound
(*(CBaseEntity **)(puVar5 + 4),"SmokerZombie.TongueRetract",0.0,(float *)0x0);
this[0x33fc] = (CTerrorPlayer)0x1;
}
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.