1
0
forked from 0ad/0ad

Fix hero selection ring not cleared when the unit goes out of the world (when garrisoning for instance).

Patch by trompetin17, fixes #2627.

This was SVN commit r16274.
This commit is contained in:
Nicolas Auvray 2015-02-06 20:47:31 +00:00
parent 18a1820d9c
commit 0a53c5e06a

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games. /* Copyright (C) 2015 Wildfire Games.
* This file is part of 0 A.D. * This file is part of 0 A.D.
* *
* 0 A.D. is free software: you can redistribute it and/or modify * 0 A.D. is free software: you can redistribute it and/or modify
@ -345,6 +345,14 @@ void CCmpSelectable::HandleMessage(const CMessage& msg, bool UNUSED(global))
break; break;
} }
case MT_PositionChanged: 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;
}
}
case MT_TerrainChanged: case MT_TerrainChanged:
case MT_WaterChanged: case MT_WaterChanged:
{ {