Explorar o código

Important fix that prevents treasures from sealing off, adding too many blocked tiles.

DjWarmonger %!s(int64=10) %!d(string=hai) anos
pai
achega
fe180335de
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      lib/rmg/CRmgTemplateZone.cpp

+ 3 - 1
lib/rmg/CRmgTemplateZone.cpp

@@ -814,7 +814,9 @@ bool CRmgTemplateZone::createTreasurePile(CMapGenerator* gen, int3 &pos, float m
 			}
 			if (placeFound.valid())
 				info.nextTreasurePos = placeFound;
-			}
+			else
+				break; //no more place to add any objects
+		}
 	}
 
 	if (treasures.size())