fix: prevent bots from staying forever trying to destroy breakable (fixes #288)

This commit is contained in:
dmitry 2022-02-22 13:51:59 +03:00
commit ce01e28be3
No known key found for this signature in database
GPG key ID: 8297CE728B7A7E37
3 changed files with 40 additions and 1 deletions

View file

@ -1263,6 +1263,8 @@ void Bot::newRound () {
m_breakableEntity = nullptr;
m_breakableOrigin = nullptr;
m_lastBreakable = nullptr;
m_timeDoorOpen = 0.0f;
resetCollision ();
@ -1283,6 +1285,7 @@ void Bot::newRound () {
m_shootAtDeadTime = 0.0f;
m_oldCombatDesire = 0.0f;
m_liftUsageTime = 0.0f;
m_breakableTime = 0.0f;
m_avoidGrenade = nullptr;
m_needAvoidGrenade = 0;
@ -1392,6 +1395,7 @@ void Bot::newRound () {
}
m_msgQueue.clear ();
m_goalHistory.clear ();
m_ignoredBreakable.clear ();
// clear last trace
for (auto i = 0; i < TraceChannel::Num; ++i) {