Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make wesnothd use savefile format for new games
This patch changes the mp wesnothd protocol. multiplayer connect now works as following: multiplayer_create/configure creates saved_game object which is then loaded by mp_connect and sended to the server in the usual savefile format, this especially implies that [side] are no longer at toplevel but instead nested into [scenario] or [snapshot]. mp options are saved into state (the saved_game object) (state_.mp_settings()) previously we had a separate mp_settings object for that now we only have one mp_setting object. This commit still not fixes mp modification/era events/options. The reason is, that i want to move the expansion of those to saved_game.cpp for better compatibility to Sp (Especially make era events work in mp games reloaded in sp), but if that won't work i'll just enable them how they were before. There are still some things to do. Especially the server generated replay-saves will be completely broken. (will fix in another commit) we don't use the [replay_start] as starting pos in mp anymore so i removed 2 lines in playcampaign that assumed that. I also removed soem code in mo_game_utils that seemed redundant, bugged or useless since we now send the [carryover_sides_start] over the network too there is no reason to apply [carryover_sides_start] before getting into mp_connect engine (when advanging the the next scenario), even more, since the new code expects only ONE of [carryover_sides_start] or [carryover_sides] to be present, we cannot expand carryover_sides_start in playcampaign before going to mp_connect because we might wan to modify [carryover_sides_start] in mp_connect still TODO: * rename mp::configure::get_parameters * reimplement mp modification/era s events/options * remove fields from the mp_game_settings object * remove disabled/outcommented code
- Loading branch information
Showing
16 changed files
with
260 additions
and
229 deletions.
There are no files selected for viewing
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
Oops, something went wrong.