Minor fixes

This commit is contained in:
Andras Schmelczer 2023-06-01 08:21:39 +01:00
parent 8817e5b090
commit c26fd93087
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
6 changed files with 26 additions and 18 deletions

View file

@ -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;