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

Method ProcessVoiceData

extensions/sdktools/hooks.cpp:588–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586
587#if !defined CLIENTVOICE_HOOK_SUPPORT
588bool CHookManager::ProcessVoiceData(CLC_VoiceData *msg)
589{
590 IClient *pClient = (IClient *)((intptr_t)(META_IFACEPTR(IClient)) - sizeof(void *));
591 if (pClient == NULL)
592 {
593 return true;
594 }
595
596 int client = pClient->GetPlayerSlot() + 1;
597
598 if (g_hTimerSpeaking[client])
599 {
600 timersys->KillTimer(g_hTimerSpeaking[client]);
601 }
602
603 g_hTimerSpeaking[client] = timersys->CreateTimer(&g_SdkTools, 0.3f, (void *)(intptr_t)client, 0);
604
605 m_OnClientSpeaking->PushCell(client);
606 m_OnClientSpeaking->Execute();
607
608 return true;
609}
610#endif
611
612void CHookManager::OnPluginLoaded(IPlugin *plugin)

Callers

nothing calls this directly

Calls 4

KillTimerMethod · 0.80
CreateTimerMethod · 0.80
PushCellMethod · 0.80
ExecuteMethod · 0.45

Tested by

no test coverage detected