mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Throw an exception if empty zone is generated
This commit is contained in:
@@ -529,7 +529,12 @@ void CZonePlacer::assignZones(CRandomGenerator * rand)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto zone : zones)
|
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);
|
moveZoneToCenterOfMass(zone.second);
|
||||||
|
}
|
||||||
|
|
||||||
//assign actual tiles to each zone using nonlinear norm for fine edges
|
//assign actual tiles to each zone using nonlinear norm for fine edges
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user