Skip to content

Commit

Permalink
Fix battlescape only initializing if a unit was selected
Browse files Browse the repository at this point in the history
  • Loading branch information
SupSuper committed Jul 12, 2017
1 parent 49985a6 commit 559e755
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Battlescape/BattlescapeState.cpp
Expand Up @@ -519,10 +519,13 @@ void BattlescapeState::init()
_reserve = _btnReserveNone;
break;
}
if (_firstInit && playableUnitSelected())
if (_firstInit)
{
_battleGame->setupCursor();
_map->getCamera()->centerOnPosition(_save->getSelectedUnit()->getPosition());
if (playableUnitSelected())
{
_battleGame->setupCursor();
_map->getCamera()->centerOnPosition(_save->getSelectedUnit()->getPosition());
}
_firstInit = false;
_btnReserveNone->setGroup(&_reserve);
_btnReserveSnap->setGroup(&_reserve);
Expand Down

0 comments on commit 559e755

Please sign in to comment.