Display: fixed moving units drawing under foreground terrains
This commit is contained in:
parent
54fd91cc55
commit
c72ac0079d
1 changed files with 12 additions and 7 deletions
|
@ -2538,21 +2538,15 @@ void display::draw_gamemap()
|
|||
}
|
||||
|
||||
//
|
||||
// Units
|
||||
// Real (standing) units
|
||||
//
|
||||
if(!dc_->teams().empty()) {
|
||||
unit_drawer drawer = unit_drawer(*this);
|
||||
|
||||
// Real units
|
||||
for(const unit& real_unit : dc_->units()) {
|
||||
drawer.redraw_unit(real_unit);
|
||||
}
|
||||
|
||||
// Fake (moving) units
|
||||
for(const unit* temp_unit : *fake_unit_man_) {
|
||||
drawer.redraw_unit(*temp_unit);
|
||||
}
|
||||
|
||||
// TODO: re-add exclusionary checks for exclusive_unit_draw_requests_ later on, if necessary.
|
||||
#if 0
|
||||
auto request = exclusive_unit_draw_requests_.find(loc);
|
||||
|
@ -2565,6 +2559,17 @@ void display::draw_gamemap()
|
|||
//
|
||||
draw_visible_hexes(visible_hexes, FOREGROUND);
|
||||
|
||||
//
|
||||
// Fake (moving) units
|
||||
//
|
||||
if(!dc_->teams().empty()) {
|
||||
unit_drawer drawer = unit_drawer(*this); // TODO: don't create this twice per cycle.
|
||||
|
||||
for(const unit* temp_unit : *fake_unit_man_) {
|
||||
drawer.redraw_unit(*temp_unit);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draws various overlays, such as reach maps, etc.
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue