Skip to content

Fixed stack leniency calculations#406

Open
Wieku wants to merge 2 commits into
itdelatrisu:masterfrom
Wieku:master
Open

Fixed stack leniency calculations#406
Wieku wants to merge 2 commits into
itdelatrisu:masterfrom
Wieku:master

Conversation

@Wieku
Copy link
Copy Markdown

@Wieku Wieku commented Jun 18, 2018

Fixes the first part of #401 issue. Stack leniency calculations were wrong for sliders, which were clearly visible on some 2B maps, such as "Mayday" or "Endless Tewi-ma Park."

Copy link
Copy Markdown
Contributor

@tpenguinltg tpenguinltg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested this yet, but code-wise, I think it's fine apart from the few minor things I pointed out.

Comment thread src/itdelatrisu/opsu/states/Game.java Outdated
private void calculateStacks() {
// reverse pass for stack calculation
for (int i = gameObjects.length - 1; i > 0; i--) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed.

Comment thread src/itdelatrisu/opsu/states/Game.java Outdated
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed.

Comment thread src/itdelatrisu/opsu/states/Game.java Outdated
continue;

// check if in range stack calculation
float timeI = hitObjectI.getTime() - (approachTime * beatmap.stackLeniency);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parentheses around approachTime * beatmap.stackLeniency can be removed as * has precedence over -.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was basing on the code that was before that had parenthesis

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, then I would have kept it the way you had it, but it seems I didn't reply soon enough. Oh well, it's done now, so let's see if @itdelatrisu cares much about it.

hitObjectI = hitObjectN;
}
}
} else if (hitObjectI.isSlider()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we care about the case where the hit object is not a circle or slider (e.g. when it's a spinner)? If so, should we be doing anything with it in an else clause?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we don't care about them.

@Wieku
Copy link
Copy Markdown
Author

Wieku commented Aug 23, 2018

I can't request a review (i don't know why), so summon @itdelatrisu

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants