CTerrorPlayer::PlayerZombieAbortControl
0x009c7e40 · 677 bytes · __thiscall
_ZN13CTerrorPlayer24PlayerZombieAbortControlEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::PlayerZombieAbortControl() */
void __thiscall CTerrorPlayer::PlayerZombieAbortControl(CTerrorPlayer *this)
{
uint uVar1;
int *piVar2;
CBaseEntity *pCVar3;
char cVar4;
int iVar5;
undefined *puVar6;
longdouble lVar7;
undefined4 uVar8;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
QAngle local_3c [12];
float local_30;
float local_2c;
float local_28;
undefined4 local_24;
undefined4 local_20;
undefined4 local_1c;
CBaseEntity *local_18;
undefined4 local_14;
undefined4 local_10;
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar5 == 3) {
cVar4 = (**(code **)(*(int *)this + 0x558))(this);
if (cVar4 == '\0') {
cVar4 = (**(code **)(*(int *)this + 300))(this);
if ((cVar4 != '\0') && (this[0x32c4] != (CTerrorPlayer)0x0)) {
uVar1 = *(uint *)(this + 0x30bc);
this[0x3fe1] = (CTerrorPlayer)0x1;
puVar6 = g_pEntityList;
*(undefined4 *)(this + 0x3fe4) = *(undefined4 *)(this + 0x100);
if ((uVar1 != 0xffffffff) &&
(((puVar6 = puVar6 + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) &&
(piVar2 = *(int **)(puVar6 + 4), piVar2 != (int *)0x0)))) {
lVar7 = (longdouble)(**(code **)(*piVar2 + 0x344))(piVar2);
puVar6 = g_pEntityList;
uVar1 = *(uint *)(this + 0x30bc);
iVar5 = 0;
*(float *)(this + 0x3fe8) = (float)lVar7;
if (uVar1 != 0xffffffff) {
puVar6 = puVar6 + (uVar1 & 0xfff) * 0x10;
if ((puVar6 == (undefined *)0xfffffffc) || (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) {
iVar5 = 0;
}
else {
iVar5 = *(int *)(puVar6 + 4);
}
}
uVar8 = 0;
if (0.0 < *(float *)(iVar5 + 0x458)) {
uVar8 = *(undefined4 *)(iVar5 + 0x454);
}
*(undefined4 *)(this + 0x3fec) = uVar8;
}
CCSPlayer::State_Transition((CCSPlayer *)this,8);
}
}
else {
cVar4 = CTerrorGameRules::HasPlayerControlledZombies();
if (cVar4 == '\0') {
local_24 = 0xc61c3c00;
local_20 = 2;
local_1c = 0;
local_18 = (CBaseEntity *)0x0;
local_14 = 0;
local_10 = 0;
ForEachTerrorPlayer<HighestFlowDistance>((HighestFlowDistance *)&local_24);
pCVar3 = local_18;
if (local_18 != (CBaseEntity *)0x0) {
if (((byte)local_18[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(local_18);
}
local_48 = *(undefined4 *)(pCVar3 + 0x2e0);
local_44 = *(undefined4 *)(pCVar3 + 0x2e4);
local_40 = *(undefined4 *)(pCVar3 + 0x2e8);
cVar4 = FindNearbySpawnSpot(this,(Vector *)&local_48,3,false,100.0);
if (cVar4 == '\0') {
FindNearbySpawnSpot(this,(Vector *)&local_48,3,false,1000.0);
}
CBaseEntity::SetAbsOrigin((CBaseEntity *)this,(Vector *)&local_48);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
pCVar3 = local_18;
if (((byte)local_18[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(local_18);
}
local_30 = *(float *)(pCVar3 + 0x2e0) - *(float *)(this + 0x2e0);
local_2c = *(float *)(pCVar3 + 0x2e4) - *(float *)(this + 0x2e4);
local_28 = *(float *)(pCVar3 + 0x2e8) - *(float *)(this + 0x2e8);
VectorAngles((Vector *)&local_30,local_3c);
CBasePlayer::SnapEyeAngles((CBasePlayer *)this,local_3c);
}
}
else {
WarpGhostToInitialPosition(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.