mirror of
https://github.com/vcmi/vcmi.git
synced 2025-10-08 23:22:25 +02:00
Store TerrainType by havlue and handle by reference
This commit is contained in:
@@ -83,8 +83,8 @@ void ConnectionsPlacer::selfSideDirectConnection(const rmg::ZoneConnection & con
|
||||
//1. Try to make direct connection
|
||||
//Do if it's not prohibited by terrain settings
|
||||
const auto& terrains = VLC->terrainTypeHandler->terrains();
|
||||
bool directProhibited = vstd::contains(terrains[zone.getTerrainType()]->prohibitTransitions, otherZone->getTerrainType())
|
||||
|| vstd::contains(terrains[otherZone->getTerrainType()]->prohibitTransitions, zone.getTerrainType());
|
||||
bool directProhibited = vstd::contains(terrains[zone.getTerrainType()].prohibitTransitions, otherZone->getTerrainType())
|
||||
|| vstd::contains(terrains[otherZone->getTerrainType()].prohibitTransitions, zone.getTerrainType());
|
||||
auto directConnectionIterator = dNeighbourZones.find(otherZoneId);
|
||||
if(!directProhibited && directConnectionIterator != dNeighbourZones.end())
|
||||
{
|
||||
|
Reference in New Issue
Block a user