1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Fixes for map editor

1) fix owner serialization for hero placeholder
2) fix roads/rivers layout
3) fix lasso
This commit is contained in:
nordsoft
2023-10-24 23:58:26 +02:00
parent ab7caa0777
commit b6b75beb29
5 changed files with 52 additions and 6 deletions

View File

@@ -336,7 +336,8 @@ void CGameStateCampaign::replaceHeroesPlaceholders(const std::vector<CampaignHer
CGHeroInstance *heroToPlace = campaignHeroReplacement.hero;
heroToPlace->id = campaignHeroReplacement.heroPlaceholderId;
heroToPlace->tempOwner = heroPlaceholder->tempOwner;
if(heroPlaceholder->tempOwner.isValidPlayer())
heroToPlace->tempOwner = heroPlaceholder->tempOwner;
heroToPlace->pos = heroPlaceholder->pos;
heroToPlace->type = VLC->heroh->objects[heroToPlace->subID];
heroToPlace->appearance = VLC->objtypeh->getHandlerFor(Obj::HERO, heroToPlace->type->heroClass->getIndex())->getTemplates().front();