Codechange: Remove direct access to _colour_gradient.
Access is now through GetColourGradient, which ensures parameters are in range.
This commit is contained in:

committed by
Peter Nelson

parent
56cf89d189
commit
0463d4c198
@@ -346,7 +346,7 @@ void BuildOwnerLegend()
|
||||
|
||||
int i = NUM_NO_COMPANY_ENTRIES;
|
||||
for (const Company *c : Company::Iterate()) {
|
||||
_legend_land_owners[i].colour = _colour_gradient[c->colour][5];
|
||||
_legend_land_owners[i].colour = GetColourGradient(c->colour, 5);
|
||||
_legend_land_owners[i].company = c->index;
|
||||
_legend_land_owners[i].show_on_map = true;
|
||||
_legend_land_owners[i].col_break = false;
|
||||
|
Reference in New Issue
Block a user