Page MenuHomeWildfire Games

Fix hero selection rings becoming unsaturated when moving
ClosedPublic

Authored by Sandarac on May 28 2017, 12:30 AM.

Details

Summary

When testing D432, it was noticed that hero selection overlays become unsaturated when their position changes (even if they are still selected). rP16274 introduced this bug by setting m_AlphaMin and m_Color.a to MIN_ALPHA_ALWAYS_VISIBLE needlessly if the hero moved and was still inWorld.
m_Color.a and m_AlphaMin just need to be set to MIN_ALPHA_UNSELECTED (0) when the hero moves out of world.

(The selection overlay won't be rendered if m_Color.a is set to 0, saving some computations).

Test Plan

Without the diff, move a hero around, and notice that the selection overlay becomes unsaturated while still selected (move it around with another unit as well to compare). With the diff, this should not happen.

Garrison and ungarrison the hero to verify that the selection ring still disappears and reappears correctly.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 2020
Build 3247: Vulcan BuildJenkins

Event Timeline

Sandarac created this revision.May 28 2017, 12:30 AM
Sandarac updated this revision to Diff 2267.May 28 2017, 6:48 AM

Fix whitespace.

Vulcan added a subscriber: Vulcan.May 28 2017, 10:44 AM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1388/ for more details.

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1392/ for more details.

Itms accepted this revision.Jun 4 2017, 3:01 PM

Thanks a lot for the patch!

This revision is now accepted and ready to land.Jun 4 2017, 3:01 PM
This revision was automatically updated to reflect the committed changes.