Ver código fonte

Fix possible crash on re-recruiting hero that transferred in campaign

Ivan Savenko 5 meses atrás
pai
commit
24ad703f86
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      lib/gameState/CGameStateCampaign.cpp

+ 1 - 0
lib/gameState/CGameStateCampaign.cpp

@@ -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);
 	}