New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix negative beatIndex NewBeat events not being correctly fired #841

Merged
merged 8 commits into from May 24, 2017

Conversation

2 participants
@smoogipoo
Contributor

smoogipoo commented May 23, 2017

At least, fixes OnNewBeat being called with the "same" timing point - because this was constructing a new timing point every time.

I didn't implement .Equals + .GetHashCode on the control points due to their mutability.

Show outdated Hide outdated osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs
where T : ControlPoint, new()
{
if (list.Count == 0)
return new T();
if (time < list[0].Time)
return new T();
return prePoint?.Invoke() ?? new T();

This comment has been minimized.

@peppy

peppy May 23, 2017

Member

any reason for the func?

@peppy

peppy May 23, 2017

Member

any reason for the func?

@peppy peppy changed the title from Controlpoint rework to Fix negative beatIndex NewBeats not being correctly fired May 24, 2017

@peppy

peppy approved these changes May 24, 2017

@peppy peppy merged commit 03c745a into ppy:master May 24, 2017

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@peppy peppy changed the title from Fix negative beatIndex NewBeats not being correctly fired to Fix negative beatIndex NewBeat events not being correctly fired May 24, 2017

@smoogipoo smoogipoo deleted the smoogipoo:controlpoint-rework branch Feb 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment