浏览代码

Bring back special case for the first victim with nothing found yet - needed so that we avoid stomping nothing at all

tags/v1.1.2
Fen Dweller 5 年前
父节点
当前提交
34a39643b5
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      recursive-macro.js

+ 4
- 1
recursive-macro.js 查看文件

@@ -405,7 +405,10 @@ function fill_area(area, weights, variance=0.15)


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


正在加载...
取消
保存