Netplay spectator notification fix (#13409)

Fix double notification when the host switches to spectator.
This commit is contained in:
Cthulhu-throwaway 2021-12-24 12:42:16 -03:00 committed by GitHub
parent 689057a9b2
commit 6a100272a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7214,7 +7214,9 @@ void netplay_toggle_play_spectate(netplay_t *netplay)
netplay->device_clients[device] &= ~(1<<netplay->self_client_num);
/* Announce it */
announce_play_spectate(netplay, NULL, NETPLAY_CONNECTION_SPECTATING, 0, -1);
if (!netplay->is_server)
announce_play_spectate(netplay,
NULL, NETPLAY_CONNECTION_SPECTATING, 0, -1);
netplay_cmd_mode(netplay, NETPLAY_CONNECTION_SPECTATING);
}