fix: nav: correct player feet in calculated jump direction
fix: planner: correct radius checking in astar path smoothing
This commit is contained in:
parent
d2ded6f0a4
commit
c3f9c02ec5
2 changed files with 2 additions and 2 deletions
|
|
@ -850,7 +850,7 @@ bool Bot::updateNavigation () {
|
||||||
if (feet.z > feet.z) {
|
if (feet.z > feet.z) {
|
||||||
feet = pev->origin + pev->maxs;
|
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
|
// calculate like we do with grenades
|
||||||
auto velocity = calcThrow (feet, node);
|
auto velocity = calcThrow (feet, node);
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ bool AStarAlgo::cantSkipNode (const int a, const int b) {
|
||||||
const auto &ag = graph[a];
|
const auto &ag = graph[a];
|
||||||
const auto &bg = graph[b];
|
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) {
|
if (hasZeroRadius) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue