Parcourir la source

Fixed monster strength selection.

DjWarmonger il y a 11 ans
Parent
commit
e56f41b8be
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      client/CPreGame.cpp

+ 4 - 1
client/CPreGame.cpp

@@ -1716,7 +1716,10 @@ CRandomMapTab::CRandomMapTab()
 	addButtonsWithRandToGroup(monsterStrengthGroup, monsterStrengthBtns, 0, 2, WIDE_BTN_WIDTH, 248, 251);
 	monsterStrengthGroup->onChange = [&](int btnId)
 	{
-		mapGenOptions.setMonsterStrength(static_cast<EMonsterStrength::EMonsterStrength>(btnId + EMonsterStrength::GLOBAL_WEAK)); //value 2 to 4
+		if (btnId < 0)
+			mapGenOptions.setMonsterStrength(EMonsterStrength::RANDOM);
+		else
+			mapGenOptions.setMonsterStrength(static_cast<EMonsterStrength::EMonsterStrength>(btnId + EMonsterStrength::GLOBAL_WEAK)); //value 2 to 4
 	};
 
 	// Show random maps btn