bot: refactor and clean up old code
fix: crash when saving old format pwf on hlds bot: moved sdk headers to separate submodule nav: improved unstuck and avoidance (thanks @commandcobra7) code bot: use correct path slashes depending on platform for all data cfg: removed simplified chines' translation, as it's too outdated
This commit is contained in:
parent
48e157c7b4
commit
7b58d51973
42 changed files with 365 additions and 3805 deletions
|
|
@ -51,7 +51,7 @@ public:
|
|||
// bot heuristic functions for astar planner
|
||||
class Heuristic final {
|
||||
public:
|
||||
using Func = Lambda <float (int, int, int)>;
|
||||
using Func = float (*) (int, int, int);
|
||||
|
||||
public:
|
||||
// least kills and number of nodes to goal for a team
|
||||
|
|
@ -84,7 +84,7 @@ public:
|
|||
};
|
||||
|
||||
// A* algorithm for bots
|
||||
class AStarAlgo final : public DenyCopying {
|
||||
class AStarAlgo final : public NonCopyable {
|
||||
public:
|
||||
using HeuristicFn = Heuristic::Func;
|
||||
|
||||
|
|
@ -137,6 +137,9 @@ public:
|
|||
|
||||
m_constructedPath.reserve (getMaxLength ());
|
||||
m_smoothedPath.reserve (getMaxLength ());
|
||||
|
||||
m_constructedPath.shrink ();
|
||||
m_smoothedPath.shrink ();
|
||||
}
|
||||
|
||||
// set the g heuristic
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue