Browse Source

MapEditor fixes non-standard terrain rules for dirt terrain patterns

Opuszek 3 weeks ago
parent
commit
7358e40aca
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/mapping/CMapOperation.cpp

+ 2 - 2
lib/mapping/CMapOperation.cpp

@@ -421,9 +421,9 @@ CDrawTerrainOperation::ValidationResult CDrawTerrainOperation::validateTerrainVi
 			{
 				if(recDepth == 0 && map->isInTheMap(currentPos))
 				{
-					if(terType->getId() == centerTerType->getId())
+					if(centerTerType->getId() == terType->getId() || (centerTerType->getId() == ETerrainId::DIRT && !terType->isTransitionRequired()))
 					{
-						const auto patternForRule = LIBRARY->terviewh->getTerrainViewPatternsById(centerTerType->getId(), rule.name);
+						const auto patternForRule = LIBRARY->terviewh->getTerrainViewPatternsById(terType->getId(), rule.name);
 						if(auto p = patternForRule)
 						{
 							auto rslt = validateTerrainView(currentPos, &(p->get()), 1);