CTerrorPlayer::OnPounceEnded
0x009a4a90 · 1456 bytes · __thiscall
_ZN13CTerrorPlayer13OnPounceEndedEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::OnPounceEnded() */
void __thiscall CTerrorPlayer::OnPounceEnded(CTerrorPlayer *this)
{
CTerrorPlayer CVar1;
uint uVar2;
code *pcVar3;
CBaseEdict *pCVar4;
int *piVar5;
undefined4 uVar6;
undefined *puVar7;
int iVar8;
undefined *puVar9;
undefined *puVar10;
int iVar11;
CCSPlayer *this_00;
longdouble lVar12;
int local_20;
if ((this[0x3e78] != (CTerrorPlayer)0x0) &&
(lVar12 = (longdouble)CountdownTimer::Now(), (float)lVar12 < *(float *)(this + 0x32dc))) {
CBaseEntity::EmitSound((CBaseEntity *)this,"HunterZombie.Pounce.Cancel",0.0,(float *)0x0);
}
if (this[0x3e79] != (CTerrorPlayer)0x0) {
*(undefined4 *)(this + 0x3ea4) = *(undefined4 *)(gpGlobals + 4);
}
uVar2 = *(uint *)(this + 0x3e64);
this_00 = (CCSPlayer *)0x0;
if ((((uVar2 == 0xffffffff) ||
(puVar10 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar10 + 8) != uVar2 >> 0xc)) ||
(this_00 = *(CCSPlayer **)(puVar10 + 4), this_00 == (CCSPlayer *)0x0)) goto LAB_009a4af3;
(**(code **)(*(int *)this + 0x7fc))(this,0x12,0);
(**(code **)(*(int *)(this_00 + 0x3ab4) + 0xb8))(this_00 + 0x3ab4);
if ((g_pEntityList == (undefined *)0xfffffffc) || (*(int *)(g_pEntityList + 8) != 0)) {
iVar11 = 0;
}
else {
iVar11 = *(int *)(g_pEntityList + 4);
}
uVar2 = *(uint *)(this_00 + 0x3e68);
if (((uVar2 == 0xffffffff) ||
(puVar10 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar10 + 8) != uVar2 >> 0xc)) {
if (iVar11 != 0) goto LAB_009a4fb0;
}
else if (iVar11 != *(int *)(puVar10 + 4)) {
LAB_009a4fb0:
if (this_00[0x6c] == (CCSPlayer)0x0) {
pCVar4 = *(CBaseEdict **)(this_00 + 0x30);
if (pCVar4 != (CBaseEdict *)0x0) {
*(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
*(undefined2 *)(iVar11 + 2) = 0;
}
}
else {
this_00[0x70] = (CCSPlayer)((byte)this_00[0x70] | 1);
}
*(undefined4 *)(this_00 + 0x3e68) = 0;
}
piVar5 = (int *)CCSPlayer::GetActiveCSWeapon(this_00);
if (piVar5 != (int *)0x0) {
(**(code **)(*piVar5 + 0x424))(piVar5);
}
lVar12 = (longdouble)CountdownTimer::Now();
if ((float)lVar12 + 2.0 != *(float *)(this_00 + 0x2e68)) {
(**(code **)(*(int *)(this_00 + 0x2e60) + 4))(this_00 + 0x2e60,this_00 + 0x2e68);
*(float *)(this_00 + 0x2e68) = (float)lVar12 + 2.0;
}
if (*(float *)(this_00 + 0x2e64) != 2.0) {
(**(code **)(*(int *)(this_00 + 0x2e60) + 4))(this_00 + 0x2e60,this_00 + 0x2e64);
*(undefined4 *)(this_00 + 0x2e64) = 0x40000000;
}
if (this_00[0x1a90] != (CCSPlayer)0x1) {
(**(code **)(*(int *)(this_00 + 0x1a40) + 4))(this_00 + 0x1a40,this_00 + 0x1a90);
this_00[0x1a90] = (CCSPlayer)0x1;
}
if (this_00[0x1a91] != (CCSPlayer)0x0) {
(**(code **)(*(int *)(this_00 + 0x1a40) + 4))(this_00 + 0x1a40,this_00 + 0x1a91);
this_00[0x1a91] = (CCSPlayer)0x0;
}
if (*(int *)(this_00 + 0x1a94) != 0) {
(**(code **)(*(int *)(this_00 + 0x1a40) + 4))(this_00 + 0x1a40,this_00 + 0x1a94);
*(undefined4 *)(this_00 + 0x1a94) = 0;
}
CBaseEntity::AddFlag((CBaseEntity *)this_00,2);
LAB_009a4af3:
piVar5 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"pounce_end",0,0);
if (piVar5 != (int *)0x0) {
pcVar3 = *(code **)(*piVar5 + 0x30);
uVar6 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
(*pcVar3)(piVar5,"userid",uVar6);
if (this_00 != (CCSPlayer *)0x0) {
pcVar3 = *(code **)(*piVar5 + 0x30);
uVar6 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this_00 + 0x30));
(*pcVar3)(piVar5,"victim",uVar6);
}
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar5,0);
}
puVar7 = g_pEntityList;
puVar10 = g_pEntityList + 4;
if ((puVar10 == (undefined *)0x0) || (*(int *)(g_pEntityList + 8) != 0)) {
local_20 = 0;
}
else {
local_20 = *(int *)(g_pEntityList + 4);
}
uVar2 = *(uint *)(this + 0x3e64);
if (((uVar2 == 0xffffffff) ||
(puVar9 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar9 + 8) != uVar2 >> 0xc)) {
iVar11 = 0;
}
else {
iVar11 = *(int *)(puVar9 + 4);
}
if (local_20 != iVar11) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar4 = *(CBaseEdict **)(this + 0x30);
if (pCVar4 != (CBaseEdict *)0x0) {
*(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
*(undefined2 *)(iVar11 + 2) = 0;
puVar10 = g_pEntityList + 4;
puVar7 = g_pEntityList;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x3e64) = 0;
}
if ((puVar10 == (undefined *)0x0) || (*(int *)(puVar7 + 8) != 0)) {
iVar11 = 0;
}
else {
iVar11 = *(int *)(puVar7 + 4);
}
uVar2 = *(uint *)(this + 0x3e68);
if (((uVar2 == 0xffffffff) ||
(puVar7 = puVar7 + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) {
iVar8 = 0;
}
else {
iVar8 = *(int *)(puVar7 + 4);
}
if (iVar11 == iVar8) {
CVar1 = this[0x3e78];
}
else {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar4 = *(CBaseEdict **)(this + 0x30);
if (pCVar4 != (CBaseEdict *)0x0) {
*(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
*(undefined2 *)(iVar11 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
CVar1 = this[0x3e78];
*(undefined4 *)(this + 0x3e68) = 0;
}
if (CVar1 == (CTerrorPlayer)0x0) {
CVar1 = this[0x3e79];
}
else {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar4 = *(CBaseEdict **)(this + 0x30);
if (pCVar4 != (CBaseEdict *)0x0) {
*(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
iVar11 = CBaseEdict::GetChangeAccessor(pCVar4);
*(undefined2 *)(iVar11 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
CVar1 = this[0x3e79];
this[0x3e78] = (CTerrorPlayer)0x0;
}
if ((CVar1 != (CTerrorPlayer)0x0) &&
(piVar5 = (int *)CCSPlayer::GetActiveCSWeapon((CCSPlayer *)this), piVar5 != (int *)0x0)) {
(**(code **)(*piVar5 + 0x3f0))(piVar5,0xb3);
}
uVar2 = *(uint *)(this + 0x30bc);
this[0x3e79] = (CTerrorPlayer)0x0;
if ((((uVar2 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar2 >> 0xc)) &&
(piVar5 = *(int **)(puVar10 + 4), piVar5 != (int *)0x0)) {
(**(code **)(*piVar5 + 900))(piVar5,0);
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.