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; } }
bool CCSBot::IsWellPastSafe() const { CCSBotManager *ctrl = TheCSBots(); if (ctrl->GetElapsedRoundTime() > 1.25f * m_safeTime) return true; return false; }
float CCSBot::GetSafeTimeRemaining() const { CCSBotManager *ctrl = TheCSBots(); return m_safeTime - ctrl->GetElapsedRoundTime(); }