PathFollower::JumpOverGaps
0x00768700 · 1744 bytes · __cdecl
_ZN12PathFollower12JumpOverGapsEP8INextBotPKN4Path7SegmentERK6VectorS8_f
Decompiled
undefined (5 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* PathFollower::JumpOverGaps(INextBot*, Path::Segment const*, Vector const&, Vector const&, float)
*/
char PathFollower::JumpOverGaps
(INextBot *param_1,Segment *param_2,Vector *param_3,Vector *param_4,float param_5)
{
uint *puVar1;
float fVar2;
float fVar3;
float fVar4;
code *pcVar5;
char cVar6;
int *piVar7;
int *piVar8;
int iVar9;
IHandleEntity *pIVar10;
int iVar11;
int iVar12;
float *pfVar13;
longdouble lVar14;
float fVar15;
float in_stack_00000018;
char local_6d;
undefined4 local_6c;
undefined4 local_68;
undefined4 local_64;
undefined4 local_60;
undefined4 local_58;
undefined4 local_54;
int local_50;
undefined4 local_4c;
undefined4 local_48;
int local_44;
float local_40;
float local_3c;
float local_38;
undefined **local_34 [4];
Segment *local_24;
undefined4 local_20;
local_6c = 0;
local_68 = 0;
if (_towlower == 0) {
local_50 = 0;
}
else {
(**(code **)(_towlower + 0x50))
(_towlower,&local_6c,0,0,0,0,
"/data/src/game/server/nextbot/path/nextbotpathfollow.cpp",0x68a,
&JumpOverGaps(INextBot*,Path::Segment_const*,Vector_const&,Vector_const&,float)::
tm_fmt,"(%s)%s","NextBot","PathFollower::JumpOverGaps");
local_50 = _towlower;
}
iVar11 = _DAT_0105db00;
local_58 = local_6c;
local_54 = local_68;
/* try { // try from 00768896 to 007688f6 has its CatchHandler @ 00768e27 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar9 = ThreadGetCurrentId(), iVar11 == iVar9)) {
if ((char *)*_DAT_0105d15c != "PathFollower::JumpOverGaps") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcaa63a,(char *)0x0,0xca8906);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
if (*(int *)(NextBotAllowGapJumping._28_4_ + 0x30) != 0) {
/* try { // try from 007687ca to 007687ed has its CatchHandler @ 00768e2b */
piVar7 = (int *)(**(code **)(*(int *)param_2 + 0xc0))(param_2);
piVar8 = (int *)(**(code **)(*(int *)param_2 + 0xc4))(param_2);
cVar6 = (**(code **)(*piVar7 + 200))(piVar7);
/* try { // try from 00768920 to 00768ac1 has its CatchHandler @ 00768e2b */
if (((cVar6 == '\0') && (cVar6 = (**(code **)(*piVar7 + 0x118))(piVar7), cVar6 == '\0')) &&
((cVar6 = (**(code **)(*piVar7 + 0xf8))(piVar7), cVar6 != '\0' &&
((cVar6 = (**(code **)(*piVar8 + 0x100))(piVar8,0), cVar6 != '\0' &&
(*(int *)(param_1 + 0x4758) != 0)))))) {
pIVar10 = (IHandleEntity *)(**(code **)(*(int *)param_2 + 0xb4))(param_2);
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)local_34,pIVar10,0,IgnoreActorsTraceFilterFunction);
local_34[0] = &PTR_ShouldHitEntity_00ca96c8;
local_24 = param_2;
local_20 = 0;
lVar14 = (longdouble)(**(code **)(*piVar8 + 0x118))(piVar8);
fVar15 = (float)lVar14;
iVar11 = (**(code **)(*(int *)param_1 + 0x5c))(param_1,*(undefined4 *)(param_1 + 0x4758));
if (iVar11 != 0) {
if (*(int *)(iVar11 + 0x18) == 3) {
LAB_00768a4a:
local_64 = 0;
local_60 = 0;
if (_towlower == 0) {
local_44 = 0;
}
else {
(**(code **)(_towlower + 0x50))
(_towlower,&local_64,0,0,0,0,
"/data/src/game/server/nextbot/path/nextbotpathfollow.cpp",0x6ce,
&JumpOverGaps(INextBot*,Path::Segment_const*,Vector_const&,Vector_const&,float)
::tm_fmt,"(%s)%s","NextBot","PathFollower::GapJumping");
local_44 = _towlower;
}
iVar9 = _DAT_0105db00;
local_4c = local_64;
local_48 = local_60;
/* try { // try from 00768af1 to 00768af5 has its CatchHandler @ 00768e23 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar12 = ThreadGetCurrentId(), iVar9 == iVar12)) {
if ((char *)*_DAT_0105d15c != "PathFollower::GapJumping") {
/* try { // try from 00768d52 to 00768d75 has its CatchHandler @ 00768e23 */
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode
((char *)_DAT_0105d15c,0xcaa655,(char *)0x0,0xca8906);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
fVar2 = *(float *)(iVar11 + 0x1c);
fVar15 = fVar15 * 0.5;
fVar3 = *(float *)(iVar11 + 0x20);
fVar4 = *(float *)(iVar11 + 0x24);
pcVar5 = *(code **)(*piVar7 + 0x160);
/* try { // try from 00768b50 to 00768c54 has its CatchHandler @ 00768deb */
pfVar13 = (float *)(**(code **)(*piVar7 + 300))(piVar7);
local_40 = fVar2 * fVar15 + *pfVar13;
local_3c = fVar3 * fVar15 + pfVar13[1];
local_38 = fVar4 * fVar15 + pfVar13[2];
local_6d = (*pcVar5)(piVar7,&local_40);
if ((local_6d == '\0') ||
(iVar11 = (**(code **)(*(int *)param_1 + 0x58))(param_1,iVar11), iVar11 == 0)) {
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar9 = ThreadGetCurrentId(), iVar11 == iVar9)) {
cVar6 = CVProfNode::ExitScope();
if (cVar6 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
local_6d = '\0';
if (local_44 != 0) {
(**(code **)(local_44 + 0x54))(local_44,local_4c,local_48,0,0,0);
}
}
else {
(**(code **)(*piVar7 + 0xc0))(piVar7,iVar11 + 8);
*(int *)(param_1 + 0x4758) = iVar11;
cVar6 = INextBot::IsDebugging((INextBot *)param_2,4);
if (cVar6 != '\0') {
NDebugOverlay::Cross3D
((Vector *)(*(int *)(param_1 + 0x4758) + 8),5.0,0,0xff,0xff,true,5.0);
DevMsg("%3.2f: GAP JUMP\n",(double)*(float *)(gpGlobals + 0xc));
}
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar9 = ThreadGetCurrentId(), iVar11 == iVar9)) {
cVar6 = CVProfNode::ExitScope();
if (cVar6 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_44 != 0) {
(**(code **)(local_44 + 0x54))(local_44,local_4c,local_48,0,0,0);
}
}
goto LAB_007687fa;
}
iVar11 = *(int *)(param_1 + 0x4758);
if (iVar11 != 0) {
do {
if (fVar15 + fVar15 < in_stack_00000018) break;
if (*(int *)(iVar11 + 0x18) == 3) goto LAB_00768a4a;
in_stack_00000018 = in_stack_00000018 + *(float *)(iVar11 + 0x28);
iVar11 = (**(code **)(*(int *)param_1 + 0x58))(param_1,iVar11);
} while (iVar11 != 0);
}
}
}
}
local_6d = '\0';
LAB_007687fa:
iVar11 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar9 = ThreadGetCurrentId(), iVar11 == iVar9)) {
cVar6 = CVProfNode::ExitScope();
if (cVar6 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_50 != 0) {
(**(code **)(local_50 + 0x54))(local_50,local_58,local_54,0,0,0);
}
return local_6d;
}
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.