Browse Source

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

DjWarmonger 10 years ago
parent
commit
fe180335de
1 changed files with 3 additions and 1 deletions
  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())