SurvivorResponseCachedInfo::Update
0x00877900 · 1021 bytes · __thiscall
_ZN26SurvivorResponseCachedInfo6UpdateEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* SurvivorResponseCachedInfo::Update() */
void __thiscall SurvivorResponseCachedInfo::Update(SurvivorResponseCachedInfo *this)
{
float fVar1;
float fVar2;
float fVar3;
char cVar4;
int iVar5;
undefined4 *puVar6;
CBaseEntity *pCVar7;
float *pfVar8;
SurvivorResponseCachedInfo *pSVar9;
int iVar10;
undefined4 *puVar11;
SurvivorResponseCachedInfo *pSVar12;
float *pfVar13;
SurvivorResponseCachedInfo *pSVar14;
float fVar15;
int local_d4;
undefined4 local_cc;
undefined4 local_c8;
undefined4 local_c0;
undefined4 local_bc;
int local_b8;
undefined4 local_b4;
undefined4 local_b0;
undefined4 local_ac;
undefined4 local_a8;
undefined4 local_a4;
undefined4 local_a0;
undefined4 local_9c [8];
undefined4 local_7c [3];
float local_70 [24];
local_cc = 0;
local_c8 = 0;
if (___atan2f_finite == 0) {
local_b8 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_cc,0,0,0,0,"/data/src/game/server/terror/director.cpp",0x1ef5
,&Update()::tm_fmt,"(%s)%s","Unaccounted","SurvivorResponseCachedInfo::Update");
local_b8 = ___atan2f_finite;
}
iVar10 = _DAT_0105db00;
local_c0 = local_cc;
local_bc = local_c8;
/* try { // try from 008779ca to 008779ce has its CatchHandler @ 00877d30 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar5 = ThreadGetCurrentId(), iVar10 == iVar5)) {
if ((char *)*_DAT_0105d15c != "SurvivorResponseCachedInfo::Update") {
/* try { // try from 00877ca4 to 00877cb5 has its CatchHandler @ 00877d30 */
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcdd8e0,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
puVar6 = local_9c;
do {
*puVar6 = 0;
puVar6 = puVar6 + 1;
} while (puVar6 != local_7c);
iVar10 = 1;
if (0 < *(int *)(gpGlobals + 0x14)) {
do {
/* try { // try from 00877a0b to 00877be1 has its CatchHandler @ 00877d0c */
pCVar7 = (CBaseEntity *)UTIL_PlayerByIndex(iVar10);
if (((((pCVar7 != (CBaseEntity *)0x0) && (*(int *)(pCVar7 + 0x30) != 0)) &&
((*(int *)(pCVar7 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 != 0 &&
((cVar4 = (**(code **)(*(int *)pCVar7 + 0x16c))(pCVar7), cVar4 != '\0' &&
(*(int *)(pCVar7 + 0x1f6c) != 2)))))) &&
(iVar5 = CBaseEntity::GetTeamNumber(pCVar7), iVar5 == 2)) &&
(*(uint *)(pCVar7 + 0x2ba0) < 8)) {
local_9c[*(uint *)(pCVar7 + 0x2ba0)] = pCVar7;
}
iVar10 = iVar10 + 1;
} while (iVar10 <= *(int *)(gpGlobals + 0x14));
}
puVar6 = local_9c;
local_b4 = (anonymous_namespace)::s_infinity;
local_b0 = (anonymous_namespace)::s_infinity;
local_ac = (anonymous_namespace)::s_infinity;
puVar11 = local_7c;
do {
pCVar7 = (CBaseEntity *)*puVar6;
if (pCVar7 == (CBaseEntity *)0x0) {
pCVar7 = (CBaseEntity *)&local_b4;
}
else {
if (((byte)pCVar7[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar7);
}
pCVar7 = pCVar7 + 0x2e0;
}
puVar6 = puVar6 + 1;
*puVar11 = *(undefined4 *)pCVar7;
puVar11[1] = *(undefined4 *)(pCVar7 + 4);
puVar11[2] = *(undefined4 *)(pCVar7 + 8);
puVar11 = puVar11 + 3;
} while (local_7c != puVar6);
local_d4 = 0;
pfVar13 = local_70;
pSVar14 = this + 0x20;
pSVar12 = this;
while( true ) {
local_d4 = local_d4 + 1;
*(float *)(pSVar14 + -0x20) = 0.0;
if (local_d4 == 8) break;
fVar1 = pfVar13[-3];
fVar2 = pfVar13[-2];
fVar3 = pfVar13[-1];
pfVar8 = pfVar13;
pSVar9 = pSVar14;
iVar10 = local_d4;
do {
fVar15 = SQRT((fVar3 - pfVar8[2]) * (fVar3 - pfVar8[2]) +
(fVar1 - *pfVar8) * (fVar1 - *pfVar8) +
(fVar2 - pfVar8[1]) * (fVar2 - pfVar8[1]));
*(float *)pSVar9 = fVar15;
*(float *)(pSVar12 + iVar10 * 4) = fVar15;
iVar10 = iVar10 + 1;
pfVar8 = pfVar8 + 3;
pSVar9 = pSVar9 + 0x20;
} while (iVar10 != 8);
pSVar12 = pSVar12 + 0x20;
pfVar13 = pfVar13 + 3;
pSVar14 = pSVar14 + 0x24;
}
local_a8 = TerrorNavMesh::GetInitialCheckpoint(TheNavMesh);
local_a4 = 0;
local_a0 = 0;
ForEachTerrorPlayer<SurvivorsInSafeExitArea>((SurvivorsInSafeExitArea *)&local_a8);
*(undefined4 *)(this + 0x100) = local_a4;
*(undefined4 *)(this + 0x104) = local_a0;
iVar10 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar5 = ThreadGetCurrentId(), iVar10 == iVar5)) {
cVar4 = CVProfNode::ExitScope();
if (cVar4 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_b8 != 0) {
(**(code **)(local_b8 + 0x54))(local_b8,local_c0,local_bc,0,0,0);
}
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.