NetPlay: Move host input authority logic to client

This is a prerequisite for golf mode, as the client needs to be in
control of sending pad states.
This commit is contained in:
Techjar 2019-04-01 22:36:48 -04:00
commit e2f1da5210
7 changed files with 112 additions and 109 deletions

View file

@ -118,7 +118,6 @@ private:
void CheckSyncAndStartGame();
bool CompressFileIntoPacket(const std::string& file_path, sf::Packet& packet);
bool CompressBufferIntoPacket(const std::vector<u8>& in_buffer, sf::Packet& packet);
void SendFirstReceivedToHost(PadIndex map, bool state);
u64 GetInitialNetPlayRTC() const;
@ -161,9 +160,6 @@ private:
std::unordered_map<u32, std::vector<std::pair<PlayerId, u64>>> m_timebase_by_frame;
bool m_desync_detected;
std::array<GCPadStatus, 4> m_last_pad_status{};
std::array<bool, 4> m_first_pad_status_received{};
struct
{
std::recursive_mutex game;