Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix mp lobby autodownloading of addons
Makes the following changes: When we download new add-ons, - tear down the mp ui by throwing an exception - refresh the changed game config, and reload for this game mode - relaunch the mp lobby, without making a new network connection - make sure to ask the mp lobby to refresh the games list, so that we update the joinable / needs addon status appropriately. After this commit, I have tested that I can prompt other clients to download add-ons, and that they will do it successsfully and then be able to join the game. Still do: Version checking. And, check if the host has an old version.
- Loading branch information
Showing
4 changed files
with
67 additions
and
20 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/game_initialization/lobby_reload_request_exception.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
Copyright (C) 2015 by Chris Beck <render787@gmail.com> | ||
Part of the Battle for Wesnoth Project http://www.wesnoth.org/ | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY. | ||
See the COPYING file for more details. | ||
*/ | ||
#ifndef LOBBY_RELOAD_REQUEST_EXCEPTION_HPP_INCLUDED | ||
#define LOBBY_RELOAD_REQUEST_EXCEPTION_HPP_INCLUDED | ||
|
||
#include <exception> | ||
#include <string> | ||
|
||
namespace mp { | ||
|
||
struct lobby_reload_request_exception : game::error { | ||
lobby_reload_request_exception() : game::error("Lobby requested to reload the game config and launch again") {} | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters