mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Fix Orrin as starting hero on some maps
Fixes a bug that led to Orrin being replaced with a different randomly selected hero on maps where starting hero is not generated in town, but pre-placed on map
This commit is contained in:
@ -62,7 +62,7 @@ boost::shared_mutex CGameState::mutex;
|
||||
HeroTypeID CGameState::pickNextHeroType(const PlayerColor & owner)
|
||||
{
|
||||
const PlayerSettings &ps = scenarioOps->getIthPlayersSettings(owner);
|
||||
if(ps.hero >= HeroTypeID(0) && !isUsedHero(HeroTypeID(ps.hero))) //we haven't used selected hero
|
||||
if(ps.hero.isValid() && !isUsedHero(HeroTypeID(ps.hero))) //we haven't used selected hero
|
||||
{
|
||||
return HeroTypeID(ps.hero);
|
||||
}
|
||||
|
Reference in New Issue
Block a user