graph: move light level calculation to thread worker
fix: nodes with light level 0.0 should trigger bots flashlight now fix: gcc and msvc builds due to mistake in crlib refactor: add more const-correctness (ongoing)
This commit is contained in:
parent
4a35a87b25
commit
3d2579c7ea
11 changed files with 121 additions and 111 deletions
|
|
@ -2206,7 +2206,7 @@ bool Bot::advanceMovement () {
|
|||
|
||||
// helper to change bot's goal
|
||||
auto changeNextGoal = [&] {
|
||||
int newGoal = findBestGoal ();
|
||||
const int newGoal = findBestGoal ();
|
||||
|
||||
m_prevGoalIndex = newGoal;
|
||||
m_chosenGoalIndex = newGoal;
|
||||
|
|
@ -2227,10 +2227,10 @@ bool Bot::advanceMovement () {
|
|||
selectBestNextNode ();
|
||||
m_minSpeed = pev->maxspeed;
|
||||
|
||||
Task taskID = getCurrentTaskId ();
|
||||
const auto tid = getCurrentTaskId ();
|
||||
|
||||
// only if we in normal task and bomb is not planted
|
||||
if (taskID == Task::Normal && bots.getRoundMidTime () + 5.0f < game.time () && m_timeCamping + 5.0f < game.time () && !bots.isBombPlanted () && m_personality != Personality::Rusher && !m_hasC4 && !m_isVIP && m_loosedBombNodeIndex == kInvalidNodeIndex && !m_hasHostage && !m_isCreature) {
|
||||
if (tid == Task::Normal && bots.getRoundMidTime () + 5.0f < game.time () && m_timeCamping + 5.0f < game.time () && !bots.isBombPlanted () && m_personality != Personality::Rusher && !m_hasC4 && !m_isVIP && m_loosedBombNodeIndex == kInvalidNodeIndex && !m_hasHostage && !m_isCreature) {
|
||||
m_campButtons = 0;
|
||||
|
||||
const int nextIndex = m_pathWalk.next ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue