Fixed color_adjust not applying to map items (fixes #2588)
Appears to be a regression from45e8753cc5
- color adjust not applied unless local tod was different from global - and478c75bdb5
- changed the first argument of the get_light_string call from -1 to 0. Not sure why that has an effect, but if it remains 0 then the item ToD seems a bit out of sync with the rest of the map when using, say, FADE_TO_BLACK. Restoring it to -1 fixes that. I confirmed both that map-wide ToD and local [time_area] ToD apply to items after this patch.
This commit is contained in:
parent
a0199c73f9
commit
f14481ba23
1 changed files with 2 additions and 9 deletions
|
@ -2616,16 +2616,9 @@ void display::draw_hex(const map_location& loc) {
|
|||
std::pair<Itor,Itor> overlays = overlays_->equal_range(loc);
|
||||
const bool have_overlays = overlays.first != overlays.second;
|
||||
|
||||
image::light_string lt;
|
||||
|
||||
if(have_overlays) {
|
||||
tod_color tod_col = tod.color;
|
||||
|
||||
if(tod_col != get_time_of_day().color) {
|
||||
tod_col = tod_col + color_adjust_;
|
||||
}
|
||||
|
||||
lt = image::get_light_string(0, tod_col.r, tod_col.g, tod_col.b);
|
||||
tod_color tod_col = tod.color + color_adjust_;
|
||||
image::light_string lt = image::get_light_string(-1, tod_col.r, tod_col.g, tod_col.b);
|
||||
|
||||
for( ; overlays.first != overlays.second; ++overlays.first) {
|
||||
if ((overlays.first->second.team_name.empty() ||
|
||||
|
|
Loading…
Add table
Reference in a new issue