fix: prevent starting seek cover task if it's failed few moments ago
This commit is contained in:
parent
de8c200a30
commit
9ebb7fd4a7
1 changed files with 1 additions and 1 deletions
|
|
@ -1209,7 +1209,7 @@ void Bot::attackMovement () {
|
||||||
|
|
||||||
// only take cover when bomb is not planted and enemy can see the bot or the bot is VIP
|
// only take cover when bomb is not planted and enemy can see the bot or the bot is VIP
|
||||||
if (!game.is (GameFlags::CSDM)) {
|
if (!game.is (GameFlags::CSDM)) {
|
||||||
if ((m_states & Sense::SeeingEnemy) && approach < 30 && !bots.isBombPlanted () && (isInViewCone (m_enemy->v.origin) || m_isVIP)) {
|
if (m_retreatTime < game.time () && (m_states & Sense::SeeingEnemy) && approach < 30 && !bots.isBombPlanted () && (isInViewCone (m_enemy->v.origin) || m_isVIP)) {
|
||||||
m_moveSpeed = -pev->maxspeed;
|
m_moveSpeed = -pev->maxspeed;
|
||||||
startTask (Task::SeekCover, TaskPri::SeekCover, kInvalidNodeIndex, 0.0f, true);
|
startTask (Task::SeekCover, TaskPri::SeekCover, kInvalidNodeIndex, 0.0f, true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue