Skip to content

Commit

Permalink
fix QuitBox warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rt committed Apr 21, 2018
1 parent 2d90956 commit 93592ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rts/Game/UI/QuitBox.cpp
Expand Up @@ -280,8 +280,8 @@ bool CQuitBox::MousePress(int x, int y, int button)
if (!InBox(mx, my, box + teamBox))
return true;

const int teamIdx = (box.y1 + teamBox.y2 - my) / 0.025f;
const int teamNum = startTeam + teamIdx + (teamNum >= gu->myTeam);
const int teamIdx = startTeam + (box.y1 + teamBox.y2 - my) / 0.025f;
const int teamNum = teamIdx + (teamIdx >= gu->myTeam);

if (teamHandler.IsValidTeam(teamNum) && !teamHandler.Team(teamNum)->isDead) {
// we don't want to give everything to the enemy if there are allies left
Expand Down

0 comments on commit 93592ff

Please sign in to comment.