CTerrorPlayer::OnPummelEnded
0x009a3ec0 · 1323 bytes · __thiscall
_ZN13CTerrorPlayer13OnPummelEndedEbPS_
Decompiled
undefined (3 params)
/* CTerrorPlayer::OnPummelEnded(bool, CTerrorPlayer*) */
void __thiscall
CTerrorPlayer::OnPummelEnded(CTerrorPlayer *this,bool param_1,CTerrorPlayer *param_2)
{
uint uVar1;
code *pcVar2;
CBaseEdict *pCVar3;
int *piVar4;
undefined4 uVar5;
CCharge *this_00;
int iVar6;
CTerrorPlayer *pCVar7;
undefined *puVar8;
undefined *puVar9;
longdouble lVar10;
uVar1 = *(uint *)(this + 0x3e44);
if ((((uVar1 == 0xffffffff) ||
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar8 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar8 + 4) == 0)) {
uVar1 = *(uint *)(this + 0x3e48);
if ((((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar8 + 4) != 0)) {
lVar10 = (longdouble)CountdownTimer::Now();
if ((float)lVar10 + 2.0 != *(float *)(this + 0x2e68)) {
(**(code **)(*(int *)(this + 0x2e60) + 4))(this + 0x2e60,this + 0x2e68);
*(float *)(this + 0x2e68) = (float)lVar10 + 2.0;
}
if (*(float *)(this + 0x2e64) != 2.0) {
(**(code **)(*(int *)(this + 0x2e60) + 4))(this + 0x2e60,this + 0x2e64);
*(undefined4 *)(this + 0x2e64) = 0x40000000;
}
if (param_1) {
uVar1 = *(uint *)(this + 0x3e48);
pCVar7 = (CTerrorPlayer *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
pCVar7 = *(CTerrorPlayer **)(puVar8 + 4);
}
OnPummelEnded(pCVar7,false,(CTerrorPlayer *)0x0);
}
(**(code **)(*(int *)this + 0x98))(this,0,0xffffffff);
CBaseEntity::SetMoveType((CBaseEntity *)this,2,0);
uVar1 = *(uint *)(this + 0x3e48);
if (((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar8 + 8) == uVar1 >> 0xc && (*(int *)(puVar8 + 4) != 0)))) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x3e48) = 0xffffffff;
}
*(undefined4 *)(this + 0x3e54) = 0xffffffff;
(**(code **)(*(int *)(this + 0x3ab4) + 0xf8))(this + 0x3ab4);
if (this[0x39f1] == (CTerrorPlayer)0x0) {
WarpToValidPositionIfStuck(this);
return;
}
}
}
else {
CBaseEntity::RemoveFlag((CBaseEntity *)this,0x20);
if (param_1) {
uVar1 = *(uint *)(this + 0x3e44);
pCVar7 = (CTerrorPlayer *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
pCVar7 = *(CTerrorPlayer **)(puVar8 + 4);
}
OnPummelEnded(pCVar7,false,(CTerrorPlayer *)0x0);
}
piVar4 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"charger_pummel_end",0,0);
if (piVar4 != (int *)0x0) {
pcVar2 = *(code **)(*piVar4 + 0x30);
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
(*pcVar2)(piVar4,"userid",uVar5);
iVar6 = 0;
pcVar2 = *(code **)(*piVar4 + 0x30);
uVar1 = *(uint *)(this + 0x3e44);
if (((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
iVar6 = *(int *)(puVar8 + 4);
}
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(iVar6 + 0x30));
(*pcVar2)(piVar4,"victim",uVar5);
pcVar2 = *(code **)(*piVar4 + 0x30);
uVar5 = 0;
if (param_2 != (CTerrorPlayer *)0x0) {
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_2 + 0x30));
}
(*pcVar2)(piVar4,"rescuer",uVar5);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar4,0);
}
puVar8 = g_pEntityList;
uVar1 = *(uint *)(this + 0x3e44);
if ((((uVar1 != 0xffffffff) &&
(puVar9 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar9 + 4) != 0)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
puVar8 = g_pEntityList;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x3e44) = 0xffffffff;
}
uVar1 = *(uint *)(this + 0x3e4c);
if (((uVar1 != 0xffffffff) &&
(puVar9 = puVar8 + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar9 + 8) == uVar1 >> 0xc && (*(int *)(puVar9 + 4) != 0)))) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
puVar8 = g_pEntityList;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x3e4c) = 0xffffffff;
}
uVar1 = *(uint *)(this + 0x30bc);
if (((uVar1 != 0xffffffff) &&
(puVar8 = puVar8 + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar8 + 8) == uVar1 >> 0xc && (*(int *)(puVar8 + 4) != 0)))) {
this_00 = (CCharge *)
__dynamic_cast(*(int *)(puVar8 + 4),&CBaseAbility::typeinfo,&CCharge::typeinfo,0);
if (this_00 != (CCharge *)0x0) {
CCharge::ResetChargeTimer(this_00);
return;
}
}
}
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.