ILocomotion::IsPotentiallyTraversable
0x00756bd0 · 1196 bytes · __thiscall
_ZNK11ILocomotion24IsPotentiallyTraversableERK6VectorS2_NS_16TraverseWhenTypeEPf
Decompiled
undefined (5 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ILocomotion::IsPotentiallyTraversable(Vector const&, Vector const&,
ILocomotion::TraverseWhenType, float*) const */
byte __thiscall
ILocomotion::IsPotentiallyTraversable
(ILocomotion *this,float *param_1,float *param_2,undefined4 param_4,float *param_5)
{
uint *puVar1;
float fVar2;
int iVar3;
char cVar4;
int iVar5;
int *piVar6;
IHandleEntity *pIVar7;
undefined4 uVar8;
byte bVar9;
longdouble lVar10;
longdouble lVar11;
float fVar12;
undefined4 local_fc;
undefined4 local_f8;
undefined4 local_f0;
undefined4 local_ec;
int local_e8;
undefined **local_e4 [4];
int *local_d4;
undefined4 local_d0;
float local_cc;
float local_c8;
float local_c4;
float local_bc;
float local_b8;
float local_b4;
undefined4 local_ac;
undefined4 local_a8;
float local_a4;
float local_9c;
float local_98;
float local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
undefined1 local_70 [44];
float local_44;
byte local_39;
local_fc = 0;
local_f8 = 0;
if (_towlower == 0) {
local_e8 = 0;
}
else {
(**(code **)(_towlower + 0x50))
(_towlower,&local_fc,0,0,0,0,
"/data/src/game/server/nextbot/nextbotlocomotioninterface.cpp",0xb5,
&IsPotentiallyTraversable(Vector_const&,Vector_const&,ILocomotion::TraverseWhenType,float*)
::tm_fmt,"(%s)%s","NextBotExpensive","Locomotion::IsPotentiallyTraversable");
local_e8 = _towlower;
}
iVar3 = _DAT_0105db00;
local_f0 = local_fc;
local_ec = local_f8;
if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
/* try { // try from 00756da6 to 00756e06 has its CatchHandler @ 007570bb */
iVar5 = ThreadGetCurrentId();
if (iVar3 == iVar5) {
if ((char *)*_DAT_0105d15c != "Locomotion::IsPotentiallyTraversable") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xca9610,(char *)0x0,0xca957e);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
}
fVar2 = param_2[2];
fVar12 = param_1[2];
/* try { // try from 00756cba to 00756cbf has its CatchHandler @ 00757097 */
lVar10 = (longdouble)(**(code **)(*(int *)this + 0x134))(this);
if (fVar2 - fVar12 <= (float)lVar10 + 0.1) {
/* try { // try from 00756e2d to 00757064 has its CatchHandler @ 00757097 */
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
pIVar7 = (IHandleEntity *)(**(code **)(*piVar6 + 0xb4))(piVar6);
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)local_e4,pIVar7,0,IgnoreActorsTraceFilterFunction);
local_e4[0] = &PTR_ShouldHitEntity_00ca96c8;
local_d0 = param_4;
local_d4 = piVar6;
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
piVar6 = (int *)(**(code **)(*piVar6 + 0xc4))(piVar6);
lVar10 = (longdouble)(**(code **)(*piVar6 + 0x118))(piVar6);
fVar12 = (float)lVar10 * 0.25;
lVar10 = (longdouble)(**(code **)(*(int *)this + 0x130))(this);
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
piVar6 = (int *)(**(code **)(*piVar6 + 0xc4))(piVar6);
lVar11 = (longdouble)(**(code **)(*piVar6 + 0x124))(piVar6);
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
piVar6 = (int *)(**(code **)(*piVar6 + 0xc4))(piVar6);
uVar8 = (**(code **)(*piVar6 + 0x130))(piVar6);
local_8c = 0;
local_cc = *param_1;
local_c8 = param_1[1];
local_bc = *param_2 - local_cc;
local_b4 = param_2[2] - param_1[2];
local_b8 = param_2[1] - local_c8;
local_ac = 0;
local_a8 = 0;
local_87 = local_bc * local_bc + local_b4 * local_b4 + local_b8 * local_b8 != 0.0;
local_94 = ((float)lVar11 - (float)lVar10) * 0.5;
local_88 = local_94 * local_94 + fVar12 * fVar12 + fVar12 * fVar12 < 1e-06;
local_a4 = ((float)lVar11 + (float)lVar10) * 0.5;
local_c4 = param_1[2] + local_a4;
local_a4 = -local_a4;
local_9c = fVar12;
local_98 = fVar12;
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,uVar8,local_e4,local_70);
if (param_5 != (float *)0x0) {
*param_5 = local_44;
}
if (1.0 <= local_44) {
bVar9 = local_39 ^ 1;
goto LAB_00756cf9;
}
}
else if (param_5 != (float *)0x0) {
bVar9 = 0;
*param_5 = 0.0;
goto LAB_00756cf9;
}
bVar9 = 0;
LAB_00756cf9:
iVar3 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
iVar5 = ThreadGetCurrentId();
if (iVar3 == iVar5) {
cVar4 = CVProfNode::ExitScope();
if (cVar4 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (local_e8 != 0) {
(**(code **)(local_e8 + 0x54))(local_e8,local_f0,local_ec,0,0,0);
}
return bVar9;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.