From 6acccefa0a222815a8171d4e6fc9d8777f212cbc Mon Sep 17 00:00:00 2001 From: rogo Date: Thu, 1 May 2025 22:51:39 +0200 Subject: [PATCH] diffuse in both directions --- Scripts/Elements/Element.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Scripts/Elements/Element.cs b/Scripts/Elements/Element.cs index f4928ef..92fea11 100644 --- a/Scripts/Elements/Element.cs +++ b/Scripts/Elements/Element.cs @@ -93,6 +93,8 @@ public class Element{ Chunk.Swap(this, Position + Vector2I.Down); else if (Chunk.Get(Position + Vector2I.Down + randomDirection)?.Density < Density) Chunk.Swap(this, Position + Vector2I.Down + randomDirection); + else if (Chunk.Get(Position + Vector2I.Down + randomDirection * VERTICAL_OPPOSITE)?.Density < Density) + Chunk.Swap(this, Position + Vector2I.Down + randomDirection * VERTICAL_OPPOSITE); } protected Vector2I RandomDirectionDown() {