From fd499e318d58408f595da8e1889cb424bfd21677 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Sun, 14 Jan 2024 15:36:29 +0200 Subject: [PATCH] Review suggestion --- lib/rmg/CMapGenerator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/rmg/CMapGenerator.cpp b/lib/rmg/CMapGenerator.cpp index efd1528d8..39ab6baed 100644 --- a/lib/rmg/CMapGenerator.cpp +++ b/lib/rmg/CMapGenerator.cpp @@ -499,8 +499,13 @@ const std::vector CMapGenerator::getAllPossibleHeroes() const bool heroUsedAsStarting = false; for (auto const & player : map->getMapGenOptions().getPlayersSettings()) + { if (player.second.getStartingHero() == hero) + { heroUsedAsStarting = true; + break; + } + } if (heroUsedAsStarting) continue;