Fixed unit zoc not being stored as a boolean.
Added a nonintrusive workaround for reloading earlier 1.9 savefiles.
This commit is contained in:
parent
26a3dc2046
commit
38369daa3d
2 changed files with 2 additions and 2 deletions
|
@ -331,7 +331,7 @@ unit::unit(const config &cfg, bool use_traits, game_state* state) :
|
|||
alpha_ = lexical_cast_default<fixed_t>(cfg["alpha"]);
|
||||
}
|
||||
if (cfg.has_attribute("zoc")) {
|
||||
emit_zoc_ = cfg["zoc"].to_bool();
|
||||
emit_zoc_ = cfg["zoc"].to_bool(level_ > 0);
|
||||
}
|
||||
if (cfg.has_attribute("flying")) {
|
||||
flying_ = cfg["flying"].to_bool();
|
||||
|
|
|
@ -403,7 +403,7 @@ private:
|
|||
std::vector<bool> known_boolean_states_;
|
||||
static std::map<std::string, state_t> known_boolean_state_names_;
|
||||
config variables_;
|
||||
int emit_zoc_;
|
||||
bool emit_zoc_;
|
||||
STATE state_;
|
||||
|
||||
std::vector<std::string> overlays_;
|
||||
|
|
Loading…
Add table
Reference in a new issue