Skip to content

Commit

Permalink
Stop creating invisible pseudo-haloes for [item]s
Browse files Browse the repository at this point in the history
It makes halo code significantly easier to debug in the test scenario
when there isn't dozens of these around.
  • Loading branch information
jyrkive authored and GregoryLundberg committed Nov 30, 2017
1 parent 5d6cc48 commit 952cd3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/display.cpp
Expand Up @@ -107,8 +107,11 @@ void display::parse_team_overlays()
void display::add_overlay(const map_location& loc, const std::string& img, const std::string& halo, const std::string& team_name, const std::string& item_id, bool visible_under_fog)
{
if (halo_man_) {
const halo::handle halo_handle = halo_man_->add(get_location_x(loc) + hex_size() / 2,
get_location_y(loc) + hex_size() / 2, halo, loc);
halo::handle halo_handle;
if(halo != "") {
halo_handle = halo_man_->add(get_location_x(loc) + hex_size() / 2,
get_location_y(loc) + hex_size() / 2, halo, loc);
}

overlays_->emplace(loc, overlay(img, halo, halo_handle, team_name, item_id, visible_under_fog));
}
Expand Down

0 comments on commit 952cd3c

Please sign in to comment.