Skip to content

Commit

Permalink
Add CUnitDrawerData::UnitLeftRadar so dead ghosts will be generated also
Browse files Browse the repository at this point in the history
when radar coverage dissapears from a spotted unit.
  • Loading branch information
saurtron committed Jan 9, 2025
1 parent afd9a07 commit 3a18651
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rts/Rendering/Units/UnitDrawerData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,16 @@ void CUnitDrawerData::UnitEnteredRadar(const CUnit* unit, int allyTeam)
UpdateUnitIcon(unit, false, false);
}

void CUnitDrawerData::UnitLeftRadar(const CUnit* unit, int allyTeam)
{
if (allyTeam != gu->myAllyTeam)
return;

UpdateUnitGhosts(unit, unit->leavesGhost);

UpdateUnitIcon(unit, false, false);
}

void CUnitDrawerData::UnitEnteredLos(const CUnit* unit, int allyTeam)
{
RECOIL_DETAILED_TRACY_ZONE;
Expand Down

0 comments on commit 3a18651

Please sign in to comment.