Reduce invisible units' transparency (#987)

Units are rendered at 0.5 alpha when they are invisible (for example, Elvish Avengers' Ambush ability). An issue arises with the Shadow (and Nightgaunt) ghost unit which has the Nightstalker ability allowing it to be invisible at night time - in combination with its fluctuating alpha animation, it can be quite hard for the player to see at night time (https://gna.org/bugs/?14503). So this change slightly increases the alpha level of invisible units from 0.5 to 0.6.
This commit is contained in:
Wedge009 2017-05-04 16:11:10 +10:00 committed by Celtic Minstrel
parent 08420e6d10
commit 713995276b

View file

@ -104,8 +104,8 @@ void unit_drawer::redraw_unit (const unit & u) const
params.submerge= is_flying ? -1.0 : terrain_info.unit_submerge();
if (u.invisible(loc, dc) &&
params.highlight_ratio > 0.5) {
params.highlight_ratio = 0.5;
params.highlight_ratio > 0.6) {
params.highlight_ratio = 0.6;
}
if (loc == sel_hex && params.highlight_ratio == 1.0) {
params.highlight_ratio = 1.5;