From 47308913cb646864f720535aa017e0412886ef64 Mon Sep 17 00:00:00 2001 From: KJeff01 Date: Fri, 6 Oct 2023 22:22:03 -0500 Subject: [PATCH] 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. --- src/droid.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/droid.cpp b/src/droid.cpp index b25f7b926b1..7a44a5f9f37 100644 --- a/src/droid.cpp +++ b/src/droid.cpp @@ -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; } }