Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent repairs from highlighting their own commander #3400

Merged
merged 1 commit into from
Oct 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prevent repairs from highlighting their own commander
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.
KJeff01 committed Oct 7, 2023
commit 47308913cb646864f720535aa017e0412886ef64
9 changes: 9 additions & 0 deletions src/droid.cpp
Original file line number Diff line number Diff line change
@@ -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;
}
}