CTerrorPlayer::GrabVictimWithTongue
0x009a5900 · 600 bytes · __thiscall
_ZN13CTerrorPlayer20GrabVictimWithTongueEPS_
Decompiled
undefined (2 params)
/* CTerrorPlayer::GrabVictimWithTongue(CTerrorPlayer*) */
void __thiscall CTerrorPlayer::GrabVictimWithTongue(CTerrorPlayer *this,CTerrorPlayer *param_1)
{
uint uVar1;
code *pcVar2;
char cVar3;
int *piVar4;
undefined4 uVar5;
undefined *puVar6;
if (*(int *)(SurvivorNoPounceOrTongue._28_4_ + 0x30) == 0) {
cVar3 = IsInCommentaryMode();
if (cVar3 == '\0') {
if (param_1 == (CTerrorPlayer *)0x0) goto LAB_009a591b;
}
else {
cVar3 = (**(code **)(*(int *)param_1 + 0x778))(param_1);
if (cVar3 == '\0') goto LAB_009a591b;
}
uVar1 = *(uint *)(param_1 + 0x33c4);
if ((((((uVar1 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar6 + 4) == 0)) &&
(((uVar1 = *(uint *)(param_1 + 0x3e68), uVar1 == 0xffffffff ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar6 + 8) != uVar1 >> 0xc || (*(int *)(puVar6 + 4) == 0)))))) &&
(((uVar1 = *(uint *)(param_1 + 0x3e48), uVar1 == 0xffffffff ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar6 + 8) != uVar1 >> 0xc || (*(int *)(puVar6 + 4) == 0)))))) {
uVar1 = *(uint *)(param_1 + 0x3ee0);
if ((((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) &&
(*(CTerrorPlayer **)(puVar6 + 4) != (CTerrorPlayer *)0x0)) {
OnRideEnded(*(CTerrorPlayer **)(puVar6 + 4),(CTerrorPlayer *)0x0);
}
OnGrabbingWithTongue(this,param_1);
OnGrabbedByTongue(param_1,this);
piVar4 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"tongue_grab",0,0);
if (piVar4 != (int *)0x0) {
pcVar2 = *(code **)(*piVar4 + 0x30);
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
(*pcVar2)(piVar4,"userid",uVar5);
pcVar2 = *(code **)(*piVar4 + 0x30);
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30));
(*pcVar2)(piVar4,"victim",uVar5);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar4,0);
}
AbilityDebug(this,param_1,"Tongue grab starting.");
CBasePlayer::RumbleEffect((CBasePlayer *)this,'!','\0','\x04');
return;
}
}
LAB_009a591b:
ReleaseTongueVictim(this,false);
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.