mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-27 06:45:26 +00:00
fix for bug #11554
This commit is contained in:
parent
62ffc00ef5
commit
31bbbdf1b3
@ -1943,6 +1943,8 @@ private:
|
||||
if (const command* c = get_command(actual_cmd)) {
|
||||
if (is_enabled(*c)) {
|
||||
(static_cast<Worker*>(this)->*(c->handler))();
|
||||
} else {
|
||||
print(get_cmd(), "This command is currently unavaliable");
|
||||
}
|
||||
} else if (help_on_unknown_) {
|
||||
print("help", "Unknown command (" + get_cmd() + "), try " + cmd_prefix_ + "help "
|
||||
@ -2268,7 +2270,8 @@ private:
|
||||
{
|
||||
return std::string(c.has_flag('D') ? " (debug command)" : "");
|
||||
}
|
||||
bool is_enabled(const map::command& c) const
|
||||
using map::is_enabled;
|
||||
bool is_enabled(const chmap::command& c) const
|
||||
{
|
||||
return !(c.has_flag('D') && !game_config::debug);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user