IVision::Update
0x0075d680 · 1108 bytes · __thiscall
_ZN7IVision6UpdateEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* IVision::Update() */
void __thiscall IVision::Update(IVision *this)
{
uint *puVar1;
float fVar2;
int iVar3;
uint uVar4;
char cVar5;
IVision *pIVar6;
IVision *pIVar7;
undefined4 *puVar8;
int iVar9;
undefined *puVar10;
int *piVar11;
undefined4 uVar12;
longdouble lVar13;
float fVar14;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
int local_2c;
undefined4 local_28;
undefined4 local_24;
int *local_20;
local_3c = 0;
local_38 = 0;
if (_towlower == 0) {
local_2c = 0;
}
else {
(**(code **)(_towlower + 0x50))
(_towlower,&local_3c,0,0,0,0,
"/data/src/game/server/nextbot/nextbotvisioninterface.cpp",0x166,&Update()::tm_fmt,
"(%s)%s","NextBotExpensive","IVision::Update");
local_2c = _towlower;
}
iVar3 = _DAT_0105db00;
local_34 = local_3c;
local_30 = local_38;
/* try { // try from 0075d92e to 0075d98e has its CatchHandler @ 0075db08 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar9 = ThreadGetCurrentId(), iVar3 == iVar9)) {
if ((char *)*_DAT_0105d15c != "IVision::Update") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcaa1b6,(char *)0x0,0xca957e);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
pIVar7 = this + 0x18;
pIVar6 = pIVar7;
/* try { // try from 0075d73a to 0075d8b0 has its CatchHandler @ 0075db1d */
lVar13 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x20) <= (float)lVar13) {
lVar13 = (longdouble)(**(code **)(*(int *)this + 0xcc))(this);
fVar14 = (float)lVar13 * 0.5;
lVar13 = (longdouble)CountdownTimer::Now();
if ((float)lVar13 + fVar14 == *(float *)(this + 0x20)) {
fVar2 = *(float *)(this + 0x1c);
}
else {
(**(code **)(*(int *)(this + 0x18) + 4))(pIVar7,this + 0x20);
*(float *)(this + 0x20) = (float)lVar13 + fVar14;
fVar2 = *(float *)(this + 0x1c);
}
if (fVar14 != fVar2) {
/* try { // try from 0075da6d to 0075da8f has its CatchHandler @ 0075db1d */
(**(code **)(*(int *)(this + 0x18) + 4))(pIVar7,this + 0x1c);
*(float *)(this + 0x1c) = fVar14;
}
iVar3 = *(int *)(NextBotBlind._28_4_ + 0x30);
pIVar6 = (IVision *)(**(code **)(*(int *)this + 0xb0))(this);
pIVar7 = (IVision *)(**(code **)(*(int *)pIVar6 + 0xb4))(pIVar6);
if ((((pIVar7 == (IVision *)0x0) ||
(pIVar6 = pIVar7, cVar5 = (**(code **)(*(int *)pIVar7 + 0x16c))(pIVar7), cVar5 == '\0')) ||
(((byte)pIVar7[0x4004] & 1) == 0)) && (iVar3 == 0)) {
UpdateRecognizedSet(this);
uVar12 = *(undefined4 *)(this + 0x44);
local_28 = (**(code **)(*(int *)this + 0xb0))(this);
local_20 = (int *)0x0;
local_24 = uVar12;
ForEachRecognized<ConsiderRecognizedSet>(this,(ConsiderRecognizedSet *)&local_28);
uVar4 = *(uint *)(this + 0x40);
piVar11 = (int *)0x0;
if (((uVar4 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar4 >> 0xc)) {
piVar11 = *(int **)(puVar10 + 4);
}
if (local_20 != piVar11) {
if (local_20 == (int *)0x0) {
*(undefined4 *)(this + 0x40) = 0xffffffff;
}
else {
puVar8 = (undefined4 *)(**(code **)(*local_20 + 0xc))(local_20);
*(undefined4 *)(this + 0x40) = *puVar8;
}
piVar11 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
uVar12 = 0;
uVar4 = *(uint *)(this + 0x40);
if (((uVar4 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar10 + 8) == uVar4 >> 0xc)) {
uVar12 = *(undefined4 *)(puVar10 + 4);
}
(**(code **)(*piVar11 + 0x58))(piVar11,uVar12);
}
*(undefined4 *)(this + 0x44) = *(undefined4 *)(gpGlobals + 0xc);
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar9 = ThreadGetCurrentId(), iVar3 == iVar9)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_2c == 0) {
return;
}
(**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,0,0,0);
return;
}
*(undefined4 *)(this + 0x38) = 0;
*(undefined4 *)(this + 0x40) = 0xffffffff;
}
iVar3 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar9 = ThreadGetCurrentId(pIVar6), iVar3 == iVar9)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_2c != 0) {
(**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,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.