Skip to content

Commit

Permalink
Don't display repair icon if we are hovering the mouse over ourselves…
Browse files Browse the repository at this point in the history
…, and we are damaged.

fixes ticket:3242
  • Loading branch information
vexed committed Mar 23, 2012
1 parent d89dbd0 commit 1fae454
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/display.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 1fae454

Please sign in to comment.