mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Fix hero selection rings becoming unsaturated when moving. Patch by Sandarac, refs 0a53c5e06a, #2627.
Differential Revision: https://code.wildfiregames.com/D563 This was SVN commit r19732.
This commit is contained in:
parent
a63d7cc430
commit
2527aabd5d
1 changed files with 8 additions and 6 deletions
|
|
@ -381,12 +381,14 @@ void CCmpSelectable::HandleMessage(const CMessage& msg, bool UNUSED(global))
|
|||
}
|
||||
case MT_PositionChanged:
|
||||
{
|
||||
if (m_AlwaysVisible)
|
||||
{
|
||||
const CMessagePositionChanged& msgData = static_cast<const CMessagePositionChanged&> (msg);
|
||||
m_AlphaMin = msgData.inWorld ? MIN_ALPHA_ALWAYS_VISIBLE : MIN_ALPHA_UNSELECTED;
|
||||
m_Color.a = m_AlphaMin;
|
||||
}
|
||||
if (!m_AlwaysVisible)
|
||||
break;
|
||||
|
||||
const CMessagePositionChanged& msgData = static_cast<const CMessagePositionChanged&> (msg);
|
||||
if (msgData.inWorld && !m_Selected)
|
||||
m_Color.a = m_AlphaMin = MIN_ALPHA_ALWAYS_VISIBLE;
|
||||
else if (!msgData.inWorld)
|
||||
m_Color.a = m_AlphaMin = MIN_ALPHA_UNSELECTED;
|
||||
|
||||
InvalidateStaticOverlay();
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue