Skip to content

Commit

Permalink
fixup 13155c4
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cbeck88 committed Jun 18, 2014
1 parent 876b24b commit fd9379e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/display.cpp
Expand Up @@ -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);
}

Expand Down

0 comments on commit fd9379e

Please sign in to comment.