From c3f9c02ec548c5fe7e4d98dd43dc174c203c1b8b Mon Sep 17 00:00:00 2001 From: jeefo Date: Wed, 7 Jun 2023 23:22:30 +0300 Subject: [PATCH] fix: nav: correct player feet in calculated jump direction fix: planner: correct radius checking in astar path smoothing --- src/navigate.cpp | 2 +- src/planner.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/navigate.cpp b/src/navigate.cpp index d88d780..487a166 100644 --- a/src/navigate.cpp +++ b/src/navigate.cpp @@ -850,7 +850,7 @@ bool Bot::updateNavigation () { if (feet.z > feet.z) { feet = pev->origin + pev->maxs; } - feet = { pev->origin.x, pev->origin.y, feet.z }; + feet = { pev->origin.x, pev->origin.y, pev->origin.z }; // calculate like we do with grenades auto velocity = calcThrow (feet, node); diff --git a/src/planner.cpp b/src/planner.cpp index ec2cbd2..93bcc6f 100644 --- a/src/planner.cpp +++ b/src/planner.cpp @@ -176,7 +176,7 @@ bool AStarAlgo::cantSkipNode (const int a, const int b) { const auto &ag = graph[a]; const auto &bg = graph[b]; - const bool hasZeroRadius = cr::fzero (ag.radius) || cr::fzero (ag.radius); + const bool hasZeroRadius = cr::fzero (ag.radius) || cr::fzero (bg.radius); if (hasZeroRadius) { return true;