Minor fixes
This commit is contained in:
parent
8817e5b090
commit
c26fd93087
6 changed files with 26 additions and 18 deletions
|
|
@ -112,10 +112,10 @@ fn main(
|
|||
// trailBelow.g = settings.isNextGenerationOdd * (trailBelow.r + trailBelow.g);
|
||||
} else {
|
||||
let relativeWeight = mix(trailBelow.g - trailBelow.r, trailBelow.r - trailBelow.g, isFromOddGeneration);
|
||||
if relativeWeight > 0 && (
|
||||
if (relativeWeight > 0 && (
|
||||
(isFromCurrentGeneration == 1.0 && trailBelow.a == 0 && random.b < settings.infectionProbability)
|
||||
|| (isFromCurrentGeneration == 0.0 && trailBelow.a > 0)
|
||||
) {
|
||||
)) || (trailBelow.a > 0 && isFromCurrentGeneration == 0.0){
|
||||
// trailBelow.r = isFromOddGeneration * (trailBelow.r + trailBelow.g);
|
||||
// trailBelow.g = (1 - isFromOddGeneration) * (trailBelow.r + trailBelow.g);
|
||||
agent.generation = (agent.generation + 1) % 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue