Procházet zdrojové kódy

Simplify cluster calculation

tags/v1.1.2
Fen Dweller před 6 roky
rodič
revize
e147bf5af4
1 změnil soubory, kde provedl 3 přidání a 5 odebrání
  1. +3
    -5
      recursive-macro.js

+ 3
- 5
recursive-macro.js Zobrazit soubor

@@ -404,11 +404,9 @@ function fill_area(area, weights, variance=0.15)
// if we have nothing at all, it's even better! // if we have nothing at all, it's even better!


while (loopvar < limit) { while (loopvar < limit) {
if (loopvar <= clusters[candidate.name] && loopvar == 0 && Math.random() < cluster_chances[candidate.name]) {
++count;
}
else if (loopvar <= clusters[candidate.name]) {
if (Math.random() < candidate.weight ? 1 : 0 || Math.random() < 0.75 * cluster_chances[candidate.name]) {
if (loopvar <= clusters[candidate.name]) {
if (Math.random() < candidate.weight ? 1 : Math.random() < cluster_chances[candidate.name]) {
++count; ++count;
} }
} }


Načítá se…
Zrušit
Uložit