CTerrorPlayer::OnStartBeingPummeled
0x009bf020 · 695 bytes · __thiscall
_ZN13CTerrorPlayer20OnStartBeingPummeledEPS_
Decompiled
undefined (2 params)
/* CTerrorPlayer::OnStartBeingPummeled(CTerrorPlayer*) */
void __thiscall CTerrorPlayer::OnStartBeingPummeled(CTerrorPlayer *this,CTerrorPlayer *param_1)
{
uint uVar1;
CBaseEdict *this_00;
char *pcVar2;
uint *puVar3;
int iVar4;
int iVar5;
undefined *puVar6;
uint uVar7;
CAI_Concept local_4c [8];
undefined4 local_44;
undefined4 local_40;
AI_CriteriaSet local_3c [44];
StopRevivingSomeone(this,false);
StopBeingRevived(this,false);
OnPummelEnded(this,true,(CTerrorPlayer *)0x0);
StopUseActions(this);
StopBeingDragged(this);
CancelStagger(this);
CancelTug(this);
uVar7 = *(uint *)(this + 0x33c4);
if ((((uVar7 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar7 >> 0xc)) &&
(*(CTerrorPlayer **)(puVar6 + 4) != (CTerrorPlayer *)0x0)) {
ReleaseTongueVictim(*(CTerrorPlayer **)(puVar6 + 4),false);
}
uVar7 = *(uint *)(this + 0x3e68);
if (((uVar7 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar6 + 8) == uVar7 >> 0xc &&
(*(CTerrorPlayer **)(puVar6 + 4) != (CTerrorPlayer *)0x0)))) {
OnPounceEnded(*(CTerrorPlayer **)(puVar6 + 4));
}
uVar7 = *(uint *)(this + 0x3ee0);
if (((uVar7 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar6 + 8) == uVar7 >> 0xc &&
(*(CTerrorPlayer **)(puVar6 + 4) != (CTerrorPlayer *)0x0)))) {
OnRideEnded(*(CTerrorPlayer **)(puVar6 + 4),(CTerrorPlayer *)0x0);
}
pcVar2 = (char *)SurvivorCharacterName(*(undefined4 *)(this + 0x2ba0));
AI_CriteriaSet::AI_CriteriaSet(local_3c,"subject",pcVar2);
local_44 = 0;
local_40 = 0xffffffff;
/* try { // try from 009bf14f to 009bf237 has its CatchHandler @ 009bf2f8 */
CAI_Concept::CAI_Concept(local_4c,"SurvivorWasCharged");
CResponseQueue::Add((CResponseQueue *)g_ResponseQueueManager._12_4_,local_4c,local_3c,0.0,
(CFollowupTargetSpec_t *)&local_44,(CBaseEntity *)this);
if (param_1 == (CTerrorPlayer *)0x0) {
uVar7 = 0xffffffff;
iVar5 = 0;
}
else {
puVar3 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
uVar7 = *puVar3;
if (((uVar7 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar7 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar7 >> 0xc)) {
iVar5 = 0;
}
else {
iVar5 = *(int *)(puVar6 + 4);
}
}
uVar1 = *(uint *)(this + 0x3e48);
if (((uVar1 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(puVar6 + 4);
}
if (iVar5 != iVar4) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x3e48) = uVar7;
}
ElectHeroicSurvivorBot(this);
(**(code **)(*(int *)(this + 0x3ab4) + 0xf4))(this + 0x3ab4);
AI_CriteriaSet::~AI_CriteriaSet(local_3c);
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.