mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Formatting
This commit is contained in:
parent
8bfa34e97b
commit
1762df2b77
@ -464,6 +464,7 @@ void ObjectManager::placeObject(rmg::Object & object, bool guarded, bool updateD
|
||||
objects.push_back(&instance->object());
|
||||
if(auto * m = zone.getModificator<RoadPlacer>())
|
||||
{
|
||||
//FIXME: Objects that can be removed, can be trespassed. Does not include Corpse
|
||||
if(instance->object().appearance->isVisitableFromTop())
|
||||
m->areaForRoads().add(instance->getVisitablePosition());
|
||||
else
|
||||
|
@ -31,7 +31,7 @@ void RoadPlacer::process()
|
||||
|
||||
void RoadPlacer::init()
|
||||
{
|
||||
if (zone.isUnderground())
|
||||
if(zone.isUnderground())
|
||||
{
|
||||
DEPENDENCY_ALL(RockFiller);
|
||||
}
|
||||
@ -118,7 +118,7 @@ void RoadPlacer::drawRoads(bool secondary)
|
||||
zone.freePaths().unite(roads);
|
||||
}
|
||||
|
||||
if (!generator.getMapGenOptions().isRoadEnabled())
|
||||
if(!generator.getMapGenOptions().isRoadEnabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -138,7 +138,7 @@ void RoadPlacer::drawRoads(bool secondary)
|
||||
//If our road type is not enabled, choose highest below it
|
||||
for (int8_t bestRoad = roadType.getNum(); bestRoad > RoadId(Road::NO_ROAD).getNum(); bestRoad--)
|
||||
{
|
||||
if (generator.getMapGenOptions().isRoadEnabled(RoadId(bestRoad)))
|
||||
if(generator.getMapGenOptions().isRoadEnabled(RoadId(bestRoad)))
|
||||
{
|
||||
mapProxy->drawRoads(zone.getRand(), tiles, RoadId(bestRoad));
|
||||
return;
|
||||
@ -156,11 +156,11 @@ void RoadPlacer::connectRoads()
|
||||
{
|
||||
bool noRoadNodes = false;
|
||||
//Assumes objects are already placed
|
||||
if (roadNodes.size() < 2)
|
||||
if(roadNodes.size() < 2)
|
||||
{
|
||||
//If there are no nodes, draw roads to mines
|
||||
noRoadNodes = true;
|
||||
if (auto* m = zone.getModificator<ObjectManager>())
|
||||
if(auto* m = zone.getModificator<ObjectManager>())
|
||||
{
|
||||
for(auto * object : m->getMines())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user