2017-01-08 15:28:41 +00:00
|
|
|
#include "bot_common.h"
|
|
|
|
|
2017-01-09 22:48:20 +00:00
|
|
|
CHLGameState::CHLGameState(CHLBot *owner)
|
2017-01-08 15:28:41 +00:00
|
|
|
{
|
|
|
|
m_owner = owner;
|
|
|
|
m_isRoundOver = false;
|
|
|
|
m_validateInterval.Invalidate();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reset at round start
|
|
|
|
|
2017-01-09 22:48:20 +00:00
|
|
|
void CHLGameState::Reset()
|
2017-01-08 15:28:41 +00:00
|
|
|
{
|
|
|
|
int i;
|
2017-01-10 20:51:13 +00:00
|
|
|
CHLBotManager *ctrl = TheHLBots();
|
2017-01-08 15:28:41 +00:00
|
|
|
|
|
|
|
m_isRoundOver = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update game state based on events we have received
|
|
|
|
|
2017-01-09 22:48:20 +00:00
|
|
|
void CHLGameState::OnEvent(GameEventType event, CBaseEntity *entity, CBaseEntity *other)
|
2017-01-08 15:28:41 +00:00
|
|
|
{
|
2017-01-09 22:35:08 +00:00
|
|
|
|
2017-01-08 15:28:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// True if round has been won or lost (but not yet reset)
|
|
|
|
|
2017-01-09 22:48:20 +00:00
|
|
|
bool CHLGameState::IsRoundOver() const
|
2017-01-08 15:28:41 +00:00
|
|
|
{
|
|
|
|
return m_isRoundOver;
|
|
|
|
}
|