1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Hack to fix campaigns

This commit is contained in:
Andrii Danylchenko 2023-02-13 21:10:11 +02:00
parent 59fe6dc358
commit c6feafc367

View File

@ -1621,6 +1621,13 @@ void CGHeroInstance::serializeJsonOptions(JsonSerializeFormat & handler)
if(!handler.saving)
{
if(!appearance)
{
// crossoverDeserialize
type = VLC->heroh->objects[subID];
appearance = VLC->objtypeh->getHandlerFor(Obj::HERO, type->heroClass->getIndex())->getTemplates().front();
}
patrol.patrolling = (rawPatrolRadius > NO_PATROLING);
patrol.initialPos = visitablePos();
patrol.patrolRadius = (rawPatrolRadius > NO_PATROLING) ? rawPatrolRadius : 0;