DirectChasePath::Update
0x00951df0 · 991 bytes · __cdecl
_ZN15DirectChasePath6UpdateEP8INextBotP11CBaseEntityRK9IPathCostP6Vector
Decompiled
undefined (4 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* DirectChasePath::Update(INextBot*, CBaseEntity*, IPathCost const&, Vector*) */
void DirectChasePath::Update
(INextBot *param_1,CBaseEntity *param_2,IPathCost *param_3,Vector *param_4)
{
uint *puVar1;
code *pcVar2;
int iVar3;
char cVar4;
INextBot IVar5;
int *piVar6;
int iVar7;
Vector *pVVar8;
int *piVar9;
int local_3c;
int local_38;
int local_34;
int local_30;
int local_2c;
int local_28;
int local_24;
int local_20;
piVar6 = (int *)(**(code **)(*(int *)param_2 + 0xc0))();
cVar4 = (**(code **)(*(int *)param_2 + 0x104))();
if ((((cVar4 == '\0') && (cVar4 = (**(code **)(*piVar6 + 0xd4))(), cVar4 == '\0')) &&
(cVar4 = (**(code **)(*(int *)param_1 + 0x80))(), cVar4 == '\0')) &&
(cVar4 = (**(code **)(*(int *)param_1 + 0x80))(), cVar4 == '\0')) {
(**(code **)(*(int *)param_1 + 0x90))();
piVar9 = (int *)&stack0xffffff80;
local_34 = local_28;
local_30 = local_24;
local_2c = local_20;
pcVar2 = *(code **)(*piVar6 + 0x158);
(**(code **)(*piVar6 + 300))();
cVar4 = (*pcVar2)();
if (cVar4 != '\0') {
if (*(int *)(DirectChaseNavCheck._28_4_ + 0x30) != 0) {
pVVar8 = (Vector *)(**(code **)(*piVar6 + 300))();
cVar4 = CNavMesh::DoesRayStayWithinMesh(TheNavMesh,pVVar8,(Vector *)&local_28);
if (cVar4 == '\0') goto LAB_009521e0;
}
(**(code **)(*piVar6 + 0x120))();
(**(code **)(*piVar6 + 0xb4))();
piVar6 = (int *)(**(code **)(*(int *)param_2 + 0xc4))();
(**(code **)(*piVar6 + 0xc4))();
(**(code **)(*(int *)param_1 + 0x48))();
param_1[0x480c] = (INextBot)0x1;
goto LAB_00951f67;
}
LAB_009521e0:
piVar6 = &local_34;
piVar9 = (int *)&stack0xffffff80;
}
else {
piVar6 = (int *)0x0;
piVar9 = (int *)&stack0xffffff84;
}
local_3c = 0;
local_38 = 0;
if (_towlower == 0) {
local_20 = 0;
}
else {
*piVar9 = _towlower;
piVar9[1] = (int)&local_3c;
piVar9[0xb] = (int)"ChasePath::Update";
piVar9[10] = (int)"NextBot";
piVar9[9] = (int)"(%s)%s";
piVar9[8] = (int)&ChasePath::Update(INextBot*,CBaseEntity*,IPathCost_const&,Vector*)::tm_fmt;
piVar9[7] = 0x68;
piVar9[6] = (int)"/data/src/game/server/nextbot/path/nextbotchasepath.h";
piVar9[5] = 0;
piVar9[3] = 0;
piVar9[4] = 0;
piVar9[2] = 0;
pcVar2 = *(code **)(_towlower + 0x50);
piVar9[-1] = 0x951e99;
(*pcVar2)();
local_20 = _towlower;
}
iVar3 = _DAT_0105db00;
local_28 = local_3c;
local_24 = local_38;
if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
/* try { // try from 00951ec9 to 00951ecd has its CatchHandler @ 009521e8 */
piVar9[-1] = 0x951ece;
iVar7 = ThreadGetCurrentId();
if (iVar3 == iVar7) {
if ((char *)*_DAT_0105d15c != "ChasePath::Update") {
piVar9[4] = 4;
piVar9[3] = (int)"NextBot";
piVar9[2] = 0;
piVar9[1] = (int)"ChasePath::Update";
*piVar9 = (int)_DAT_0105d15c;
/* try { // try from 00952180 to 009521a3 has its CatchHandler @ 009521e8 */
piVar9[-1] = 0x952185;
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)*piVar9,piVar9[1],(char *)piVar9[2],piVar9[3]);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
*piVar9 = (int)_DAT_0105d15c;
piVar9[-1] = 0x9521a4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
}
piVar9[4] = (int)piVar6;
piVar9[1] = (int)param_2;
*piVar9 = (int)param_1;
piVar9[3] = (int)param_4;
piVar9[2] = (int)param_3;
/* try { // try from 00951ef0 to 00951f00 has its CatchHandler @ 009521fd */
piVar9[-1] = 0x951ef5;
ChasePath::RefreshPath
((ChasePath *)*piVar9,(INextBot *)piVar9[1],(CBaseEntity *)piVar9[2],
(IPathCost *)piVar9[3],(Vector *)piVar9[4]);
piVar9[1] = (int)param_2;
*piVar9 = (int)param_1;
piVar9[-1] = 0x951f01;
PathFollower::Update((PathFollower *)*piVar9,(INextBot *)piVar9[1]);
iVar3 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
piVar9[-1] = 0x951f1e;
iVar7 = ThreadGetCurrentId();
if (iVar3 == iVar7) {
*piVar9 = (int)_DAT_0105d15c;
piVar9[-1] = 0x952125;
cVar4 = CVProfNode::ExitScope();
if (cVar4 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (local_20 != 0) {
piVar9[5] = 0;
piVar9[4] = 0;
piVar9[3] = 0;
*piVar9 = local_20;
piVar9[1] = local_28;
piVar9[2] = local_24;
pcVar2 = *(code **)(local_20 + 0x54);
piVar9[-1] = 0x951f59;
(*pcVar2)();
}
iVar3 = *(int *)param_1;
*piVar9 = (int)param_1;
pcVar2 = *(code **)(iVar3 + 0x44);
piVar9[-1] = 0x951f61;
IVar5 = (INextBot)(*pcVar2)();
param_1[0x480c] = IVar5;
LAB_00951f67:
piVar9[1] = (int)param_2;
*piVar9 = (int)param_1;
piVar9[2] = (int)param_3;
piVar9[-1] = 0x951f7a;
NotifyVictim((DirectChasePath *)*piVar9,(INextBot *)piVar9[1],(CBaseEntity *)piVar9[2]);
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.