Merge pull request #335 from cbeck88/mp_connect_bool_test
check properly if a config attribute value is not a boolean
This commit is contained in:
commit
2fa43e3df9
1 changed files with 2 additions and 2 deletions
|
@ -1059,12 +1059,12 @@ config side_engine::new_config() const
|
|||
res["income"] = income_;
|
||||
|
||||
if (!parent_.params_.use_map_settings || res["fog"].empty() ||
|
||||
(res["fog"] != "yes" && res["fog"] != "no")) {
|
||||
(res["fog"].to_bool(true) == true && res["fog"].to_bool(false) == false)) {
|
||||
res["fog"] = parent_.params_.fog_game;
|
||||
}
|
||||
|
||||
if (!parent_.params_.use_map_settings || res["shroud"].empty() ||
|
||||
(res["shroud"] != "yes" && res["shroud"] != "no")) {
|
||||
(res["shroud"].to_bool(true) == true && res["shroud"].to_bool(false) == false)) {
|
||||
res["shroud"] = parent_.params_.shroud_game;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue