| 473 | } |
| 474 | |
| 475 | bool TimerSystem::GetMapTimeLeft(float *time_left) |
| 476 | { |
| 477 | if (!m_pMapTimer) |
| 478 | { |
| 479 | return false; |
| 480 | } |
| 481 | |
| 482 | int time_limit; |
| 483 | if (!m_bHasMapSimulatedYet || (time_limit = m_pMapTimer->GetMapTimeLimit()) < 1) |
| 484 | { |
| 485 | *time_left = -1.0f; |
| 486 | } |
| 487 | else |
| 488 | { |
| 489 | *time_left = (g_fGameStartTime + time_limit * 60.0f) - gpGlobals->curtime; |
| 490 | } |
| 491 | |
| 492 | return true; |
| 493 | } |
no test coverage detected