Skip to content

Commit

Permalink
fix linger mode in mp (21985)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed May 2, 2014
1 parent d1b3cd1 commit 555ac33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/play_controller.cpp
Expand Up @@ -1376,6 +1376,10 @@ void play_controller::set_defeat_music_list(const std::string& list)

void play_controller::check_victory()
{
if(linger_)
{
return;
}
std::set<unsigned> not_defeated;
for (unit_map::const_iterator i = units_.begin(),
i_end = units_.end(); i != i_end; ++i)
Expand Down
6 changes: 4 additions & 2 deletions src/playmp_controller.cpp
Expand Up @@ -629,8 +629,10 @@ bool playmp_controller::can_execute_command(const hotkey::hotkey_command& cmd, i
switch (command){
case hotkey::HOTKEY_ENDTURN:
if (linger_)
{
return is_host_;
{
bool has_next_scenario = !resources::gamedata->next_scenario().empty() &&
resources::gamedata->next_scenario() != "null";
return is_host_ || !has_next_scenario;
}
else
{
Expand Down

0 comments on commit 555ac33

Please sign in to comment.