Properly call multi_leave_game() when host leaves multi game to let clients exit smoothly

This commit is contained in:
zicodxx 2011-07-19 11:31:08 +02:00
parent 7275fd8b87
commit 0e50a9e7c4
2 changed files with 6 additions and 0 deletions

View file

@ -1,5 +1,9 @@
D2X-Rebirth Changelog
20110719
--------
main/net_udp.c: Properly call multi_leave_game() when host leaves multi game to let clients exit smoothly
20110716
--------
main/songs.c: Correctly proceed to new Redbook track if songnum != Song_playing (hopefully - to confirm); Using songs_stop_all() in songs_uninit() to clear redundancy; added some notes to functions to shine a bit light on the mess of some functions; Also if there's no escape song, continue level music

View file

@ -1256,6 +1256,8 @@ net_udp_disconnect_player(int playernum)
if (playernum == 0) // Host has left - Quit game!
{
if (Network_status==NETSTAT_PLAYING)
multi_leave_game();
window_set_visible(Game_wind, 0);
nm_messagebox(NULL, 1, TXT_OK, "Game was closed by host!");
window_set_visible(Game_wind, 1);