fix: problems with breakable on cs_mari (ref #686)
fix: goal selection on some zombie maps (ref #684)
This commit is contained in:
parent
aeff9f8d46
commit
d6d76e136d
12 changed files with 95 additions and 86 deletions
21
inc/graph.h
21
inc/graph.h
|
|
@ -223,11 +223,11 @@ public:
|
|||
bool isNodeReacheableWithJump (const Vector &src, const Vector &destination);
|
||||
bool checkNodes (bool teleportPlayer, bool onlyPaths = false);
|
||||
bool isVisited (int index);
|
||||
bool isAnalyzed () const;
|
||||
|
||||
bool saveGraphData ();
|
||||
bool loadGraphData ();
|
||||
bool canDownload ();
|
||||
bool isAnalyzed () const;
|
||||
|
||||
void saveOldFormat ();
|
||||
void reset ();
|
||||
|
|
@ -251,8 +251,7 @@ public:
|
|||
void startLearnJump ();
|
||||
void setVisited (int index);
|
||||
void clearVisited ();
|
||||
void initBuckets ();
|
||||
void addToBucket (const Vector &pos, int index);
|
||||
|
||||
void eraseFromBucket (const Vector &pos, int index);
|
||||
void setBombOrigin (bool reset = false, const Vector &pos = nullptr);
|
||||
void unassignPath (int from, int to);
|
||||
|
|
@ -267,7 +266,6 @@ public:
|
|||
void collectOnline ();
|
||||
|
||||
IntArray getNearestInRadius (float radius, const Vector &origin, int maxCount = -1);
|
||||
const IntArray &getNodesInBucket (const Vector &pos);
|
||||
|
||||
public:
|
||||
StringRef getAuthor () const {
|
||||
|
|
@ -353,6 +351,21 @@ public:
|
|||
return m_nodeNumbers;
|
||||
}
|
||||
|
||||
// reinitialize buckets
|
||||
void initBuckets () {
|
||||
m_hashTable.clear ();
|
||||
}
|
||||
|
||||
// get the bucket of nodes near position
|
||||
const IntArray &getNodesInBucket (const Vector &pos) {
|
||||
return m_hashTable[locateBucket (pos)];
|
||||
}
|
||||
|
||||
// add a node to position bucket
|
||||
void addToBucket (const Vector &pos, int index) {
|
||||
m_hashTable[locateBucket (pos)].emplace (index);
|
||||
}
|
||||
|
||||
public:
|
||||
// graph helper for sending message to correct channel
|
||||
template <typename ...Args> void msg (const char *fmt, Args &&...args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue