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:
@@ -330,7 +330,7 @@ void CZonePlacer::placeZones(vstd::RNG * rand)
|
|||||||
{
|
{
|
||||||
return pr.second->getType() == ETemplateZoneType::WATER;
|
return pr.second->getType() == ETemplateZoneType::WATER;
|
||||||
});
|
});
|
||||||
bool mapLevels = map.getMapGenOptions().getLevels();
|
int mapLevels = map.getMapGenOptions().getLevels();
|
||||||
|
|
||||||
findPathsBetweenZones();
|
findPathsBetweenZones();
|
||||||
placeOnGrid(rand);
|
placeOnGrid(rand);
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ RmgMap::Zones RmgMap::getZonesOnLevel(int level) const
|
|||||||
Zones zonesOnLevel;
|
Zones zonesOnLevel;
|
||||||
for(const auto& zonePair : zones)
|
for(const auto& zonePair : zones)
|
||||||
{
|
{
|
||||||
if(zonePair.second->isUnderground() == (bool)level)
|
if(zonePair.second->getPos().z == level)
|
||||||
{
|
{
|
||||||
zonesOnLevel.insert(zonePair);
|
zonesOnLevel.insert(zonePair);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ Zone::~Zone() = default;
|
|||||||
|
|
||||||
bool Zone::isUnderground() const
|
bool Zone::isUnderground() const
|
||||||
{
|
{
|
||||||
return getPos().z;
|
return getPos().z == 1; // TODO: multilevel support
|
||||||
}
|
}
|
||||||
|
|
||||||
void Zone::setOptions(const ZoneOptions& options)
|
void Zone::setOptions(const ZoneOptions& options)
|
||||||
|
|||||||
Reference in New Issue
Block a user