Corrected usage of think interval for each bot.

Fixed double-jump task behaviour;.
Lowered CPU usage in player avoidance code.
Removed unused commands from 'yb help'.
Dirty fix for #44.
This commit is contained in:
jeefo 2017-02-06 22:31:54 +03:00
commit 62e9cccf7b
8 changed files with 152 additions and 120 deletions

View file

@ -1036,6 +1036,14 @@ void Bot::ReleaseUsedName (void)
}
}
float Bot::GetThinkInterval (void)
{
if (Math::FltZero (m_thinkInterval))
return m_frameInterval;
return m_thinkInterval;
}
Bot::~Bot (void)
{
// this is bot destructor
@ -1139,6 +1147,9 @@ void Bot::NewRound (void)
m_numFriendsLeft = 0;
m_numEnemiesLeft = 0;
m_avoid = nullptr;
m_avoidTime = 0.0f;
for (i = 0; i < 5; i++)
m_prevWptIndex[i] = -1;