Beispiel #1
0
void CCSBot::AdjustSafeTime()
{
	CCSBotManager *ctrl = TheCSBots();

	// if we spotted an enemy sooner than we thought possible, adjust our notion of "safe" time
	if (m_safeTime > ctrl->GetElapsedRoundTime())
	{
		// since right now is not safe, adjust safe time to be a few seconds ago
		m_safeTime = ctrl->GetElapsedRoundTime() - 2.0f;
	}
}
Beispiel #2
0
bool CCSBot::IsWellPastSafe() const
{
	CCSBotManager *ctrl = TheCSBots();

	if (ctrl->GetElapsedRoundTime() > 1.25f * m_safeTime)
		return true;

	return false;
}
Beispiel #3
0
float CCSBot::GetSafeTimeRemaining() const
{
	CCSBotManager *ctrl = TheCSBots();

	return m_safeTime - ctrl->GetElapsedRoundTime();
}