Add missing MP settings for reloaded games. Fixes #21808.
The problam was that mp::configure is not used for reloaded games and so mp_game_settings will not be fully initialised. This leads to using default values rather than values set using mp::configure screen or from reloaded game config. The optimal solution would be to either display mp::configure for reloaded games or to populate mp_game_settings using reloaded game config. However, both solutions require rather a lot of code restructing and are probably not suitable for a feature freeze.
This commit is contained in:
parent
80feaee818
commit
fa5b916bf1
2 changed files with 10 additions and 2 deletions
|
@ -43,6 +43,7 @@ Version 1.13.0-dev:
|
|||
when the campaign is reloaded from a non-host side, or after a player rejoins
|
||||
from observer status. Hopefully, reloading campaigns is easier after this.
|
||||
* Fix bug #21797: "Mandatory WML child missing" when leaving a reloaded game.
|
||||
* Fix bug #21808: Cannot join a reloaded game as an observer.
|
||||
* Fixed halos glitching through locations that become shrouded after the
|
||||
halo is rendered for the first time.
|
||||
* OS X user data directory is now ~/Library/Application Support/Wesnoth_1.13
|
||||
|
|
|
@ -139,8 +139,15 @@ config initial_level_config(game_display& disp, const mp_game_settings& params,
|
|||
// This will force connecting clients to be using the same version number as us.
|
||||
level["version"] = game_config::version;
|
||||
|
||||
level["observer"] = params.allow_observers;
|
||||
level["shuffle_sides"] = params.shuffle_sides;
|
||||
// If game was reloaded, params won't contain all required information and so we
|
||||
// need to take it from the actual level config.
|
||||
if (params.saved_game) {
|
||||
level["observer"] = level.child("multiplayer")["observer"];
|
||||
level["shuffle_sides"] = level.child("multiplayer")["shuffle_sides"];
|
||||
} else {
|
||||
level["observer"] = params.allow_observers;
|
||||
level["shuffle_sides"] = params.shuffle_sides;
|
||||
}
|
||||
|
||||
if (level["objectives"].empty()) {
|
||||
level["objectives"] = "<big>" + t_string(N_("Victory:"), "wesnoth") +
|
||||
|
|
Loading…
Add table
Reference in a new issue