CTerrorPlayer::FindResponseSubject
0x009f5260 · 816 bytes · __thiscall
_ZN13CTerrorPlayer19FindResponseSubjectEP14AI_CriteriaSet
Decompiled
undefined (2 params)
/* CTerrorPlayer::FindResponseSubject(AI_CriteriaSet*) */
void __thiscall CTerrorPlayer::FindResponseSubject(CTerrorPlayer *this,AI_CriteriaSet *param_1)
{
uint uVar1;
uint uVar2;
CBaseEdict *this_00;
CBaseEntity *pCVar3;
char cVar4;
int iVar5;
QAngle *pQVar6;
char *pcVar7;
undefined4 uVar8;
uint *puVar9;
undefined *puVar10;
int iVar11;
longdouble lVar12;
undefined **local_b4;
CTerrorPlayer *local_b0;
Vector local_ac [12];
undefined4 local_a0;
undefined4 local_9c;
undefined4 local_98;
float local_94;
undefined4 local_90;
undefined1 local_8c;
CBaseEntity *local_88;
undefined4 local_84;
undefined4 local_80;
undefined4 local_7c;
undefined4 local_78;
undefined4 local_74;
fogparams_t local_70 [36];
float local_4c;
char local_24;
iVar5 = AI_CriteriaSet::FindCriterionIndex(param_1,"Subject");
if (iVar5 != -1) {
return;
}
fogparams_t::fogparams_t(local_70);
(**(code **)(*(int *)this + 0x418))(this,local_70);
local_94 = 8192.0;
if (local_24 != '\0') {
local_94 = *(float *)(SurvivorFogVocalizePercent._28_4_ + 0x2c) * local_4c;
}
local_84 = 0;
local_b4 = &PTR_operator___00c22340;
local_80 = 0;
local_7c = 0;
local_78 = 0;
local_74 = 0;
local_b0 = this;
/* try { // try from 009f530b to 009f5322 has its CatchHandler @ 009f55c6 */
pQVar6 = (QAngle *)(**(code **)(*(int *)this + 0x238))(this);
AngleVectors(pQVar6,local_ac);
local_a0 = 0xffffffff;
local_9c = 0x3f4ccccd;
local_98 = 0x3f4ccccd;
local_88 = (CBaseEntity *)0x0;
local_90 = 0x42480000;
local_8c = 0;
/* try { // try from 009f536b to 009f5592 has its CatchHandler @ 009f55a7 */
ForEachTerrorPlayer<TargetScan<CTerrorPlayer>>((TargetScan *)&local_b4);
pCVar3 = local_88;
if (local_88 == (CBaseEntity *)0x0) {
AI_CriteriaSet::AppendCriteria(param_1,"Subject","None",1.0);
}
else {
iVar5 = CBaseEntity::GetTeamNumber(local_88);
cVar4 = IsASurvivorTeam(iVar5);
if (cVar4 == '\0') {
uVar8 = (**(code **)(*(int *)pCVar3 + 0x544))(pCVar3);
pcVar7 = (char *)ZombieClassName(uVar8);
AI_CriteriaSet::AppendCriteria(param_1,"Subject",pcVar7,1.0);
}
else {
pcVar7 = (char *)SurvivorCharacterName(*(undefined4 *)(pCVar3 + 0x2ba0));
AI_CriteriaSet::AppendCriteria(param_1,"Subject",pcVar7,1.0);
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar4 = IsASurvivorTeam(iVar5);
if (cVar4 != '\0') {
puVar9 = (uint *)(**(code **)(*(int *)pCVar3 + 0xc))(pCVar3);
uVar1 = *puVar9;
if (((uVar1 == 0xffffffff) ||
(puVar10 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar10 + 8) != uVar1 >> 0xc)) {
iVar5 = 0;
}
else {
iVar5 = *(int *)(puVar10 + 4);
}
uVar2 = *(uint *)(this + 0x2b64);
if (((uVar2 == 0xffffffff) ||
(puVar10 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar10 + 8) != uVar2 >> 0xc)) {
iVar11 = 0;
}
else {
iVar11 = *(int *)(puVar10 + 4);
}
if (iVar5 != iVar11) {
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 + 0x2b64) = uVar1;
}
lVar12 = (longdouble)CountdownTimer::Now();
if ((float)lVar12 + 3.0 != *(float *)(this + 0x2b70)) {
(**(code **)(*(int *)(this + 0x2b68) + 4))(this + 0x2b68,this + 0x2b70);
*(float *)(this + 0x2b70) = (float)lVar12 + 3.0;
}
if (*(float *)(this + 0x2b6c) != 3.0) {
(**(code **)(*(int *)(this + 0x2b68) + 4))(this + 0x2b68,this + 0x2b6c);
*(undefined4 *)(this + 0x2b6c) = 0x40400000;
}
}
}
}
local_78 = 0;
local_b4 = &PTR_operator___00c22340;
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_84);
local_74 = local_84;
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_84);
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.