Skip to content

Commit

Permalink
Fix wrong collision check for left wall juice
Browse files Browse the repository at this point in the history
  • Loading branch information
catapillie committed Apr 29, 2022
1 parent 462d084 commit 17722a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Code/Behavior/Shattering.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions Code/Entities/StrawberryDebris.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ private void TryCreateGroundSpreadJuice() {

private void TryCreateLeftWallSpreadJuice() {
if (spreadsJuice) {
Platform platform = CollideFirstOutside<Platform>(Position + Vector2.UnitX);
Platform platform = CollideFirstOutside<Platform>(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;
}
}
Expand All @@ -142,7 +142,7 @@ private void TryCreateRightWallSpreadJuice() {
if (spreadsJuice) {
Platform platform = CollideFirstOutside<Platform>(Position + Vector2.UnitX);
if (platform != null && rightWallPlatform != platform) {
rightWallJuice?.Dismiss();
//rightWallJuice?.Dismiss();
Scene.Add(rightWallJuice = new StrawberrySpreadJuice(this, platform, 1));
rightWallPlatform = platform;
}
Expand Down

0 comments on commit 17722a6

Please sign in to comment.