Skip to content

Commit

Permalink
Prevent repairs from highlighting their own commander
Browse files Browse the repository at this point in the history
If the Commander is damaged a little bit and a repair is under its control, and said repair is repairing something, it would cause various selection boxes to get drawn.
  • Loading branch information
KJeff01 committed Oct 8, 2023
1 parent 9529e46 commit cbce1cc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/droid.cpp
Expand Up @@ -2753,6 +2753,15 @@ bool droidUnderRepair(const DROID *psDroid)
DROID_CYBORG_REPAIR) && psCurr->action ==
DACTION_DROIDREPAIR && psCurr->order.psObj == psDroid)
{
BASE_OBJECT *psLeader = nullptr;
if (hasCommander(psCurr))
{
psLeader = (BASE_OBJECT *)psCurr->psGroup->psCommander;
}
if (psLeader && psLeader->id == psDroid->id)
{
continue;
}
return true;
}
}
Expand Down

0 comments on commit cbce1cc

Please sign in to comment.