1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Merge pull request #6079 from Laserlicht/fix_rmg

fix rmg underground
This commit is contained in:
Ivan Savenko
2025-08-30 20:01:38 +03:00
committed by GitHub
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)