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:
parent
7b27754858
commit
62e9cccf7b
8 changed files with 152 additions and 120 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue