read tunnel length from different config and fix tests
This commit is contained in:
@@ -427,9 +427,7 @@ void BuildingSystem::tickConstruction(Tick currentTick)
|
||||
}
|
||||
else if (front.type == BuildingType::TunnelEntry)
|
||||
{
|
||||
const BuildingDef* bdef = findBuildingDef(front.type);
|
||||
const int maxDist = (bdef && bdef->tunnelMaxDistance) ? *bdef->tunnelMaxDistance : 0;
|
||||
m_belts.placeTunnelEntry(front.anchor, front.rotation, maxDist);
|
||||
m_belts.placeTunnelEntry(front.anchor, front.rotation, m_config.world.tunnelMaxDistance);
|
||||
}
|
||||
else if (front.type == BuildingType::TunnelExit)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user