mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Fix crash on loading town with unit that has ability propagated to army
This commit is contained in:
@@ -2474,7 +2474,10 @@ std::shared_ptr<CGObjectInstance> CMapLoaderH3M::readTown(const int3 & position,
|
|||||||
|
|
||||||
std::optional<FactionID> faction;
|
std::optional<FactionID> faction;
|
||||||
if (objectTemplate->id == Obj::TOWN)
|
if (objectTemplate->id == Obj::TOWN)
|
||||||
|
{
|
||||||
faction = FactionID(objectTemplate->subid);
|
faction = FactionID(objectTemplate->subid);
|
||||||
|
object->subID = objectTemplate->subid;
|
||||||
|
}
|
||||||
|
|
||||||
bool hasName = reader->readBool();
|
bool hasName = reader->readBool();
|
||||||
if(hasName)
|
if(hasName)
|
||||||
|
|||||||
Reference in New Issue
Block a user