1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Merge pull request #1207 from Nordsoft91/fix-1206

Throw an exception if empty zone is generated
This commit is contained in:
Andrii Danylchenko 2022-12-06 14:36:56 +02:00 committed by GitHub
commit cb1ef1490c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -529,7 +529,12 @@ void CZonePlacer::assignZones(CRandomGenerator * rand)
}
for (auto zone : zones)
{
if(zone.second->area().empty())
throw rmgException("Empty zone is generated, probably RMG template is inappropriate for map size");
moveZoneToCenterOfMass(zone.second);
}
//assign actual tiles to each zone using nonlinear norm for fine edges