bot: cosmetic fixes

This commit is contained in:
jeefo 2023-05-08 23:54:38 +03:00
commit 61a4f17263
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
4 changed files with 14 additions and 14 deletions

View file

@ -55,32 +55,32 @@ public:
public:
// least kills and number of nodes to goal for a team
static float gfunctionKillsDist (int team, int currentIndex, int parentIndex);;
static float gfunctionKillsDist (int team, int currentIndex, int parentIndex);
// least kills and number of nodes to goal for a team (when with hostage)
static float gfunctionKillsDistCTWithHostage (int team, int currentIndex, int parentIndex);;
static float gfunctionKillsDistCTWithHostage (int team, int currentIndex, int parentIndex);
// least kills to goal for a team
static float gfunctionKills (int team, int currentIndex, int);;
static float gfunctionKills (int team, int currentIndex, int);
// least kills to goal for a team (when with hostage)
static auto gfunctionKillsCTWithHostage (int team, int currentIndex, int parentIndex) -> float;;
static float gfunctionKillsCTWithHostage (int team, int currentIndex, int parentIndex);
// least distance for a team
static float gfunctionPathDist (int, int currentIndex, int parentIndex);;
static float gfunctionPathDist (int, int currentIndex, int parentIndex);
// least distance for a team (when with hostage)
static float gfunctionPathDistWithHostage (int, int currentIndex, int parentIndex);;
static float gfunctionPathDistWithHostage (int, int currentIndex, int parentIndex);
public:
// square distance heuristic
static float hfunctionPathDist (int index, int, int goalIndex);;
static float hfunctionPathDist (int index, int, int goalIndex);
// square distance heuristic with hostages
static float hfunctionPathDistWithHostage (int index, int, int goalIndex);;
static float hfunctionPathDistWithHostage (int index, int, int goalIndex);
// none heuristic
static float hfunctionNone (int index, int, int goalIndex);;
static float hfunctionNone (int index, int, int goalIndex);
};
// A* algorithm for bots

View file

@ -2761,7 +2761,7 @@ void Bot::updateAimDir () {
}
}
else if (m_seeEnemyTime + 3.0f > game.time () && !m_lastEnemyOrigin.empty ()) {
m_lookAt = m_lastEnemyOrigin;;
m_lookAt = m_lastEnemyOrigin;
}
else {
m_lookAt = m_destOrigin;

View file

@ -523,7 +523,7 @@ bool PathPlanner::find (int srcIndex, int destIndex, NodeAdderFn onAddedNode, in
if (m_memoryLimitHit) {
return m_dijkstra->find (srcIndex, destIndex, onAddedNode, pathDistance);
}
return m_floyd->find (srcIndex, destIndex, onAddedNode, pathDistance);;
return m_floyd->find (srcIndex, destIndex, onAddedNode, pathDistance);
}
float PathPlanner::dist (int srcIndex, int destIndex) {

View file

@ -87,10 +87,10 @@ void GraphVistable::rebuild () {
// check if line of sight to object is not blocked (i.e. visible)
if (!cr::fequal (tr.flFraction, 1.0f)) {
res |= VisIndex::Crouch;;
res |= VisIndex::Crouch;
}
else {
res &= VisIndex::Stand;;
res &= VisIndex::Stand;
}
game.testLine (sourceStand, dest, TraceIgnore::Monsters, nullptr, &tr);
@ -99,7 +99,7 @@ void GraphVistable::rebuild () {
res |= VisIndex::Stand;
}
else {
res &= VisIndex::Crouch;;
res &= VisIndex::Crouch;
}
}
shift = static_cast <uint8_t> ((path.number % 4) << 1);