disable debug command off-turn in mp
the serer wouldn't accept these commands anyways.
This commit is contained in:
parent
d322e1fb97
commit
a1c06fbc65
2 changed files with 4 additions and 3 deletions
|
@ -241,7 +241,7 @@ bool playsingle_controller::hotkey_handler::can_execute_command(const hotkey::ho
|
|||
case hotkey::HOTKEY_CREATE_UNIT:
|
||||
case hotkey::HOTKEY_CHANGE_SIDE:
|
||||
case hotkey::HOTKEY_KILL_UNIT:
|
||||
return !events::commands_disabled && game_config::debug && play_controller_.get_map_const().on_board(mouse_handler_.get_last_hex());
|
||||
return !events::commands_disabled && game_config::debug && play_controller_.get_map_const().on_board(mouse_handler_.get_last_hex()) && play_controller_.current_team().is_local();
|
||||
|
||||
case hotkey::HOTKEY_CLEAR_LABELS:
|
||||
res = !is_observer();
|
||||
|
|
|
@ -1150,9 +1150,10 @@ protected:
|
|||
using map::is_enabled;
|
||||
bool is_enabled(const chmap::command& c) const
|
||||
{
|
||||
return !((c.has_flag('D') && !game_config::debug) || (c.has_flag('N') && !menu_handler_.pc_.is_networked_mp())
|
||||
return !((c.has_flag('D') && !game_config::debug)
|
||||
|| (c.has_flag('N') && !menu_handler_.pc_.is_networked_mp())
|
||||
|| (c.has_flag('A') && !preferences::is_authenticated())
|
||||
|| (c.has_flag('S') && (synced_context::get_synced_state() != synced_context::UNSYNCED)));
|
||||
|| (c.has_flag('S') && (synced_context::get_synced_state() != synced_context::UNSYNCED || !menu_handler_.pc_.current_team().is_local())));
|
||||
}
|
||||
|
||||
void print(const std::string& title, const std::string& message)
|
||||
|
|
Loading…
Add table
Reference in a new issue