浏览代码

Fixed monster strength selection.

DjWarmonger 11 年之前
父节点
当前提交
e56f41b8be
共有 1 个文件被更改,包括 4 次插入1 次删除
  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