mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-11 23:21:14 +00:00
Fix profile not changing when changing unit type by WML
This commit is contained in:
parent
bbdc679e74
commit
bc8a6f9643
@ -1011,6 +1011,7 @@ void unit::read(const config& cfg)
|
||||
}
|
||||
|
||||
validate_side(side_);
|
||||
bool id_set = cfg["id"] != "";
|
||||
|
||||
/* prevent un-initialized variables */
|
||||
max_hit_points_=1;
|
||||
@ -1138,7 +1139,7 @@ void unit::read(const config& cfg)
|
||||
cfg_["unit_description"] = custom_unit_desc;
|
||||
}
|
||||
|
||||
if(cfg["profile"] != "") {
|
||||
if(cfg["profile"] != "" && !id_set) {
|
||||
cfg_["profile"] = cfg["profile"];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user