don't reveal map after mp campaign games by default
It now matches the behavior in sp, this makers especially sense as sp campaigns can also be played in mp mode.
This commit is contained in:
parent
8e59da9186
commit
38d95cc3ee
3 changed files with 10 additions and 1 deletions
|
@ -1020,6 +1020,7 @@ void play_controller::check_victory()
|
|||
DBG_EE << "throwing end level exception...";
|
||||
// Also proceed to the next scenario when another player survived.
|
||||
end_level_data el_data;
|
||||
el_data.transient.reveal_map = reveal_map_default();
|
||||
el_data.proceed_to_next_level = found_player || found_network_player;
|
||||
el_data.is_victory = found_player;
|
||||
set_end_level_data(el_data);
|
||||
|
@ -1044,6 +1045,11 @@ void play_controller::process_oos(const std::string& msg) const
|
|||
save.save_game_interactive(message.str(), savegame::savegame::YES_NO); // can throw quit_game_exception
|
||||
}
|
||||
|
||||
bool play_controller::reveal_map_default() const
|
||||
{
|
||||
return saved_game_.classification().get_tagname() == "multiplayer";
|
||||
}
|
||||
|
||||
void play_controller::update_gui_to_player(const int team_index, const bool observe)
|
||||
{
|
||||
gui_->set_team(team_index, observe);
|
||||
|
@ -1321,6 +1327,7 @@ void play_controller::check_time_over()
|
|||
}
|
||||
|
||||
end_level_data e;
|
||||
e.transient.reveal_map = reveal_map_default();
|
||||
e.proceed_to_next_level = false;
|
||||
e.is_victory = false;
|
||||
set_end_level_data(e);
|
||||
|
|
|
@ -111,6 +111,8 @@ public:
|
|||
*/
|
||||
virtual void process_oos(const std::string& msg) const;
|
||||
|
||||
bool reveal_map_default() const;
|
||||
|
||||
void set_end_level_data(const end_level_data& data)
|
||||
{
|
||||
gamestate().end_level_data_ = data;
|
||||
|
|
|
@ -1652,7 +1652,7 @@ int game_lua_kernel::impl_scenario_set(lua_State *L)
|
|||
data.prescenario_save = cfg["save"].to_bool(true);
|
||||
data.replay_save = cfg["replay_save"].to_bool(true);
|
||||
data.transient.linger_mode = cfg["linger_mode"].to_bool(true) && !teams().empty();
|
||||
data.transient.reveal_map = cfg["reveal_map"].to_bool(true);
|
||||
data.transient.reveal_map = cfg["reveal_map"].to_bool(play_controller_.reveal_map_default());
|
||||
data.is_victory = cfg["result"] == level_result::victory;
|
||||
data.test_result = cfg["test_result"].str();
|
||||
play_controller_.set_end_level_data(data);
|
||||
|
|
Loading…
Add table
Reference in a new issue