Skip to content

Commit

Permalink
don't allow toggle shroud during enemies turn.
Browse files Browse the repository at this point in the history
whether DSU (= delayed shroud updates) is enabled for a team is part of
the gamestate and toggeling it during a turn of a networked side will
cause OOS sooner or later. So we cannot toggle it then.

backports 2a395fb
  • Loading branch information
gfgtdf committed Jan 10, 2015
1 parent ff05e00 commit fd6ad6d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/playsingle_controller.cpp
Expand Up @@ -1020,11 +1020,15 @@ bool playsingle_controller::can_execute_command(const hotkey::hotkey_command& cm
return (!browse_ || linger_) && !events::commands_disabled;

case hotkey::HOTKEY_DELAY_SHROUD:
return !linger_ && (teams_[gui_->viewing_team()].uses_fog() || teams_[gui_->viewing_team()].uses_shroud())
&& !events::commands_disabled;
return !linger_
&& (gui_->viewing_team() == gui_->playing_team())
&& teams_[gui_->viewing_team()].is_human()
&& (teams_[gui_->viewing_team()].uses_fog() || teams_[gui_->viewing_team()].uses_shroud())
&& !events::commands_disabled;
case hotkey::HOTKEY_UPDATE_SHROUD:
return !linger_
&& player_number_ == gui_->viewing_side()
&& teams_[gui_->viewing_team()].is_human()
&& !events::commands_disabled
&& teams_[gui_->viewing_team()].auto_shroud_updates() == false;

Expand Down

0 comments on commit fd6ad6d

Please sign in to comment.