Fix crash on 2B hitobjects

This commit is contained in:
HoLLy 2019-06-15 19:11:29 +02:00
parent c4899d90ad
commit d735d4cd7f
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
@ -47,6 +47,7 @@ void moveToNext(CatchHitObject h)
double speedRequired = positionChange / timeAvailable;
bool dashRequired = speedRequired > movement_speed && h.StartTime != 0;
bool impossibleJump = speedRequired > movement_speed * 2 && h.StartTime != 0;
// todo: get correct catcher size, based on difficulty CS.
const float catcher_width_half = CatcherArea.CATCHER_SIZE / CatchPlayfield.BASE_WIDTH * 0.3f * 0.5f;
@ -59,7 +60,7 @@ void moveToNext(CatchHitObject h)
return;
}
if (h is Banana)
if (h is Banana || impossibleJump)
{
// auto bananas unrealistically warp to catch 100% combo.
Replay.Frames.Add(new CatchReplayFrame(h.StartTime, h.X));