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

Method StartVoting

core/MenuVoting.cpp:357–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355}
356
357void VoteMenuHandler::StartVoting()
358{
359 if (!m_pCurMenu)
360 {
361 return;
362 }
363
364 m_bStarted = true;
365
366 m_pHandler->OnMenuVoteStart(m_pCurMenu);
367
368 m_displayTimer = g_Timers.CreateTimer(this, 1.0, NULL, TIMER_FLAG_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
369
370 /* By now we know how many clients were set.
371 * If there are none, we should end IMMEDIATELY.
372 */
373 if (m_Clients == 0)
374 {
375 EndVoting();
376 }
377
378 m_TotalClients = m_Clients;
379}
380
381void VoteMenuHandler::DecrementPlayerCount()
382{

Callers

nothing calls this directly

Calls 2

CreateTimerMethod · 0.80
OnMenuVoteStartMethod · 0.45

Tested by

no test coverage detected