mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
fix
This commit is contained in:
parent
3d08ecf024
commit
18b963f376
@ -433,8 +433,8 @@ OptionsTab::SelectionWindow::SelectionWindow(PlayerColor _color)
|
||||
initialHero = SEL->getStartInfo()->playerInfos.find(color)->second.hero;
|
||||
initialBonus = SEL->getStartInfo()->playerInfos.find(color)->second.bonus;
|
||||
selectedFraction = initialFraction;
|
||||
selectedHero = selectedHero;
|
||||
selectedBonus = selectedBonus;
|
||||
selectedHero = initialHero;
|
||||
selectedBonus = initialBonus;
|
||||
allowedFactions = SEL->getPlayerInfo(color.getNum()).allowedFactions;
|
||||
allowedHeroes = SEL->getMapInfo()->mapHeader->allowedHeroes;
|
||||
|
||||
@ -491,14 +491,14 @@ void OptionsTab::SelectionWindow::setSelection()
|
||||
CSH->setPlayerOption(LobbyChangePlayerOption::HERO, deltaHero > 0 ? 1 : -1, color);
|
||||
|
||||
// bonus
|
||||
//int deltaBonus = selectedBonus - initialBonus;
|
||||
int deltaBonus = selectedBonus - initialBonus;
|
||||
|
||||
//if(deltaBonus != 0)
|
||||
// for(int i = 0; i<abs(deltaBonus); i++)
|
||||
// CSH->setPlayerOption(LobbyChangePlayerOption::BONUS, deltaBonus > 0 ? 1 : -1, color);
|
||||
if(deltaBonus != 0)
|
||||
for(int i = 0; i<abs(deltaBonus); i++)
|
||||
CSH->setPlayerOption(LobbyChangePlayerOption::BONUS, deltaBonus > 0 ? 1 : -1, color);
|
||||
}
|
||||
|
||||
void OptionsTab::SelectionWindow::redraw()
|
||||
void OptionsTab::SelectionWindow::recreate()
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user