MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / GetMapTimeLeft

Method GetMapTimeLeft

core/TimerSys.cpp:475–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473}
474
475bool 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}

Callers 1

smn_GetMapTimeLeftFunction · 0.80

Calls 1

GetMapTimeLimitMethod · 0.80

Tested by

no test coverage detected