mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-13 03:29:11 +00:00
NetPlay: Implement golf mode
This is an extension of host input authority that allows switching the host (who has zero latency) on the fly, at the further expense of everyone else's latency. This is useful for turn-based games where the latency of players not on their turn doesn't matter. To become the so-called golfer, the player simply presses a hotkey. When the host is the golfer, latency is identical to normal host input authority.
This commit is contained in:
parent
e2f1da5210
commit
1a12876330
15 changed files with 263 additions and 28 deletions
|
@ -137,6 +137,8 @@ private:
|
|||
void ChunkedDataThreadFunc();
|
||||
void ChunkedDataSend(sf::Packet&& packet, PlayerId pid, const TargetMode target_mode);
|
||||
|
||||
bool PlayerHasControllerMapped(PlayerId pid) const;
|
||||
|
||||
NetSettings m_settings;
|
||||
|
||||
bool m_is_running = false;
|
||||
|
@ -154,6 +156,8 @@ private:
|
|||
bool m_codes_synced = true;
|
||||
bool m_start_pending = false;
|
||||
bool m_host_input_authority = false;
|
||||
PlayerId m_current_golfer = 1;
|
||||
PlayerId m_pending_golfer = 0;
|
||||
|
||||
std::map<PlayerId, Client> m_players;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue