fix: crash with lift handling

fix: some random crashes with some maps
fix: do not look at breakable until totally sure we're can break it
fix: wrong distance calculation in last enemy position randomizer
fix: problems with cs 1.5 won when built with ``nosmid`` switch (still crashes from time to time)
ctrl: add  bots death count to``yb list`` command
graph: disable buckets for small number of nodes graphs
graph: verify graph consistency and select appropriate pathfinding algorithm
misc: added mor vox sentences to welcome a player
This commit is contained in:
jeefo 2024-12-20 01:04:59 +03:00
commit 3a014e471b
No known key found for this signature in database
GPG key ID: D696786B81B667C8
13 changed files with 172 additions and 71 deletions

View file

@ -49,7 +49,7 @@ public:
};
// bot heuristic functions for astar planner
class Heuristic final {
class PlannerHeuristic final {
public:
using Func = float (*) (int, int, int);
@ -86,7 +86,7 @@ public:
// A* algorithm for bots
class AStarAlgo final : public NonCopyable {
public:
using HeuristicFn = Heuristic::Func;
using HeuristicFn = PlannerHeuristic::Func;
public:
struct Route {
@ -246,6 +246,7 @@ private:
UniquePtr <DijkstraAlgo> m_dijkstra {};
UniquePtr <FloydWarshallAlgo> m_floyd {};
bool m_memoryLimitHit {};
bool m_pathsCheckFailed {};
public:
PathPlanner ();
@ -269,6 +270,11 @@ public:
return m_floyd.get ();
}
public:
bool isPathsCheckFailed () const {
return m_pathsCheckFailed;
}
public:
// do the pathfinding
bool find (int srcIndex, int destIndex, NodeAdderFn onAddedNode, int *pathDistance = nullptr);