bool HLTVServerWrapperManager::OnHLTVBotNetChanSendNetMsg(INetMessage &msg, bool bForceReliable, bool bVoice) { // No need to worry about the right selected hltvserver, because there can only be one. IClient *pClient = iserver->GetClient(hltvserver->GetHLTVServer()->GetHLTVSlot()); if (!pClient) RETURN_META_VALUE(MRES_SUPERCEDE, false); // Let the message flow through the intended path like CGameClient::SendNetMsg wants to. bool bRetSent = pClient->SendNetMsg(msg, bForceReliable); // It's important to supercede, because there is no original function to call. // (the "vtable" was empty before hooking it) // See FakeNetChan variable at the top. RETURN_META_VALUE(MRES_SUPERCEDE, bRetSent); }