mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Fix possible crash on re-recruiting hero that transferred in campaign
This commit is contained in:
@@ -389,6 +389,7 @@ void CGameStateCampaign::replaceHeroesPlaceholders()
|
||||
heroToPlace->setAnchorPos(heroPlaceholder->anchorPos());
|
||||
heroToPlace->setHeroType(heroToPlace->getHeroTypeID());
|
||||
heroToPlace->appearance = heroToPlace->getObjectHandler()->getTemplates().front();
|
||||
heroToPlace->instanceName = heroPlaceholder->instanceName;
|
||||
|
||||
gameState->map->replaceObject(campaignHeroReplacement.heroPlaceholderId, heroToPlace);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user