fixed problem with loading saved games with duplicate roles
This commit is contained in:
parent
84bffedc68
commit
a955df9ec8
2 changed files with 4 additions and 3 deletions
|
@ -409,9 +409,8 @@ void event_handler::handle_event(const queued_event& event_info, config* cfg)
|
|||
if(u->matches_filter(**ir)) {
|
||||
recruit_unit(*game_map,1,*units,*u,gamemap::location(),
|
||||
screen,false);
|
||||
u = avail.erase(u);
|
||||
if(u == avail.end())
|
||||
break;
|
||||
avail.erase(u);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,6 +205,8 @@ void unit::new_level()
|
|||
maxMovement_ = backupMaxMovement_;
|
||||
maxExperience_ = backupMaxExperience_;
|
||||
|
||||
role_ = "";
|
||||
|
||||
//reapply all permanent modifications
|
||||
apply_modifications();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue