fixup 13155c4f41c7d60f9dec1e323eaa9477a54aaec3

In this commit, the order in which fake units vs real units was
changed without realizing the significance. Comments near to the
fake_units code makes it clear that the fake units are intended
to be drawn after the real units, so that e.g. when the whiteboard
is used, the fake units draw over the real ones.
This commit is contained in:
Chris Beck 2014-06-18 17:17:49 -04:00
parent 876b24b531
commit fd9379e276

View File

@ -3057,24 +3057,26 @@ void display::invalidate_animations()
}
}
const std::deque<unit*> & unit_list = fake_unit_man_->get_fake_unit_list_for_invalidation();
BOOST_FOREACH(const unit* u, unit_list) {
u->anim_comp().refresh();
}
BOOST_FOREACH(const unit & u, dc_->units()) {
u.anim_comp().refresh();
}
BOOST_FOREACH(const unit* u, unit_list) {
u->anim_comp().refresh();
}
bool new_inval;
do {
new_inval = false;
#ifdef _OPENMP
#pragma omp parallel for reduction(|:new_inval) shared(unit_list) schedule(guided)
#endif //_OPENMP
BOOST_FOREACH(const unit* u, unit_list) {
new_inval |= u->anim_comp().invalidate(*this);
}
BOOST_FOREACH(const unit & u, dc_->units()) {
new_inval |= u.anim_comp().invalidate(*this);
}
BOOST_FOREACH(const unit* u, unit_list) {
new_inval |= u->anim_comp().invalidate(*this);
}
}while(new_inval);
}