Ticket #2627: 2627.diff

File 2627.diff, 719 bytes (added by trompetin17, 9 years ago)
  • source/simulation2/components/CCmpSelectable.cpp

    diff --git a/source/simulation2/components/CCmpSelectable.cpp b/source/simulation2/components/CCmpSelectable.cpp
    index b482be3..1ace0ff 100644
    a b void CCmpSelectable::HandleMessage(const CMessage& msg, bool UNUSED(global))  
    345345            break;
    346346        }
    347347    case MT_PositionChanged:
     348        {
     349            const CMessagePositionChanged& msgData = static_cast<const CMessagePositionChanged&> (msg);
     350
     351            if (msgData.entity == this->GetEntityId())
     352                m_Color.a = m_AlphaMin = msgData.inWorld && m_AlwaysVisible? MIN_ALPHA_ALWAYS_VISIBLE : MIN_ALPHA_UNSELECTED;
     353        }
    348354    case MT_TerrainChanged:
    349355    case MT_WaterChanged:
    350356        {