1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

fix rmg underground

This commit is contained in:
Laserlicht
2025-08-29 21:22:45 +02:00
parent 6c08c23fbf
commit bf0fcaadb7
3 changed files with 3 additions and 3 deletions

View File

@@ -330,7 +330,7 @@ void CZonePlacer::placeZones(vstd::RNG * rand)
{
return pr.second->getType() == ETemplateZoneType::WATER;
});
bool mapLevels = map.getMapGenOptions().getLevels();
int mapLevels = map.getMapGenOptions().getLevels();
findPathsBetweenZones();
placeOnGrid(rand);

View File

@@ -245,7 +245,7 @@ RmgMap::Zones RmgMap::getZonesOnLevel(int level) const
Zones zonesOnLevel;
for(const auto& zonePair : zones)
{
if(zonePair.second->isUnderground() == (bool)level)
if(zonePair.second->getPos().z == level)
{
zonesOnLevel.insert(zonePair);
}

View File

@@ -42,7 +42,7 @@ Zone::~Zone() = default;
bool Zone::isUnderground() const
{
return getPos().z;
return getPos().z == 1; // TODO: multilevel support
}
void Zone::setOptions(const ZoneOptions& options)