Permalink
Browse files

Don't display repair icon if we are hovering the mouse over ourselves…

…, and we are damaged.

fixes ticket:3242
  • Loading branch information...
1 parent d89dbd0 commit 1fae45407f91a89e632a6534b4bebc10450c3e31 @vexed vexed committed Mar 20, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/display.cpp
View
@@ -835,6 +835,21 @@ void processMouseClickInput(void)
item = MT_ENEMYDROID;
}
}
+ else if (selection == SC_DROID_REPAIR)
+ {
+ // We can't repair ourselves, so change it to a blocking cursor
+ for (DROID *psCurr = apsDroidLists[selectedPlayer]; psCurr != NULL; psCurr = psCurr->psNext)
+ {
+ if (psCurr->selected)
+ {
+ if ((ObjUnderMouse != NULL) && ObjUnderMouse->player == selectedPlayer && psCurr->id == ObjUnderMouse->id)
+ {
+ item = MT_BLOCKING;
+ }
+ break;
+ }
+ }
+ }
else if (selection == SC_DROID_DEMOLISH)
{
// Can't demolish allied objects, or something that isn't built yet

0 comments on commit 1fae454

Please sign in to comment.