From 17722a642f6974fc00013b8668dc5d9150a0c995 Mon Sep 17 00:00:00 2001 From: catapillie Date: Fri, 29 Apr 2022 06:52:48 +0200 Subject: [PATCH] Fix wrong collision check for left wall juice --- Code/Behavior/Shattering.cs | 2 +- Code/Entities/StrawberryDebris.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Code/Behavior/Shattering.cs b/Code/Behavior/Shattering.cs index 2692bfe..47a957d 100644 --- a/Code/Behavior/Shattering.cs +++ b/Code/Behavior/Shattering.cs @@ -72,7 +72,7 @@ public static void OnShatter(this Strawberry strawberry) { level.Particles.Emit(explodeParticle, position, num); } - int amount = ShatteringStrawberriesModule.Settings.Shards.Amount(); + int amount = 1; if (amount > 0) { color *= 0.75f; Vector2 from = Calc.Floor(strawberry.Position); diff --git a/Code/Entities/StrawberryDebris.cs b/Code/Entities/StrawberryDebris.cs index f963161..b73f107 100644 --- a/Code/Entities/StrawberryDebris.cs +++ b/Code/Entities/StrawberryDebris.cs @@ -129,10 +129,10 @@ private void TryCreateGroundSpreadJuice() { private void TryCreateLeftWallSpreadJuice() { if (spreadsJuice) { - Platform platform = CollideFirstOutside(Position + Vector2.UnitX); + Platform platform = CollideFirstOutside(Position - Vector2.UnitX); if (platform != null && leftWallPlatform != platform) { leftWallJuice?.Dismiss(); - Scene.Add(leftWallJuice = new StrawberrySpreadJuice(this, platform, 1)); + Scene.Add(leftWallJuice = new StrawberrySpreadJuice(this, platform, -1)); leftWallPlatform = platform; } } @@ -142,7 +142,7 @@ private void TryCreateRightWallSpreadJuice() { if (spreadsJuice) { Platform platform = CollideFirstOutside(Position + Vector2.UnitX); if (platform != null && rightWallPlatform != platform) { - rightWallJuice?.Dismiss(); + //rightWallJuice?.Dismiss(); Scene.Add(rightWallJuice = new StrawberrySpreadJuice(this, platform, 1)); rightWallPlatform = platform; }