fixed problem with loading saved games with duplicate roles

This commit is contained in:
Dave White 2003-11-13 15:11:38 +00:00
parent 84bffedc68
commit a955df9ec8
2 changed files with 4 additions and 3 deletions

View file

@ -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;
}
}
}

View file

@ -205,6 +205,8 @@ void unit::new_level()
maxMovement_ = backupMaxMovement_;
maxExperience_ = backupMaxExperience_;
role_ = "";
//reapply all permanent modifications
apply_modifications();