Skip to content

Commit

Permalink
fix #6127
Browse files Browse the repository at this point in the history
all buildings are immobile, but not immobiles are buildings
  • Loading branch information
rt committed Feb 2, 2019
1 parent 1a28dfa commit e573bdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rts/Rendering/UnitDrawer.cpp
Expand Up @@ -1786,7 +1786,7 @@ void CUnitDrawer::UnitDecloaked(const CUnit* unit) {
void CUnitDrawer::UnitEnteredLos(const CUnit* unit, int allyTeam) {
CUnit* u = const_cast<CUnit*>(unit); //cleanup

if (gameSetup->ghostedBuildings && unit->unitDef->IsImmobileUnit())
if (gameSetup->ghostedBuildings && unit->unitDef->IsBuildingUnit())
spring::VectorErase(liveGhostBuildings[allyTeam][MDL_TYPE(unit)], u);

if (allyTeam != gu->myAllyTeam)
Expand All @@ -1798,7 +1798,7 @@ void CUnitDrawer::UnitEnteredLos(const CUnit* unit, int allyTeam) {
void CUnitDrawer::UnitLeftLos(const CUnit* unit, int allyTeam) {
CUnit* u = const_cast<CUnit*>(unit); //cleanup

if (gameSetup->ghostedBuildings && unit->unitDef->IsImmobileUnit())
if (gameSetup->ghostedBuildings && unit->unitDef->IsBuildingUnit())
spring::VectorInsertUnique(liveGhostBuildings[allyTeam][MDL_TYPE(unit)], u, true);

if (allyTeam != gu->myAllyTeam)
Expand Down

0 comments on commit e573bdb

Please sign in to comment.