Skip to content
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

Increase caps on near, hold timing windows #461

Merged
merged 7 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Beatmap/src/MapDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ class MapDatabase_Impl
continue;
}


String hash;
File diffFile;
if (diffFile.OpenRead(diffpath))
Expand Down Expand Up @@ -345,9 +344,9 @@ class MapDatabase_Impl
m_database.Exec("ALTER TABLE Scores ADD COLUMN window_hold INTEGER");
m_database.Exec("ALTER TABLE Scores ADD COLUMN window_miss INTEGER");
m_database.Exec("UPDATE Scores SET window_perfect=46");
m_database.Exec("UPDATE Scores SET window_good=92");
m_database.Exec("UPDATE Scores SET window_hold=138");
m_database.Exec("UPDATE Scores SET window_miss=250");
m_database.Exec("UPDATE Scores SET window_good=150");
m_database.Exec("UPDATE Scores SET window_hold=150");
m_database.Exec("UPDATE Scores SET window_miss=300");
gotVersion = 16;
}
if (gotVersion == 16)
Expand Down
6 changes: 3 additions & 3 deletions Main/include/HitStat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ struct HitWindow
}

MapTime perfect = 46;
MapTime good = 92;
MapTime hold = 138;
MapTime miss = 250;
MapTime good = 150;
MapTime hold = 150;
MapTime miss = 300;
MapTime slam = 84;

static const HitWindow NORMAL;
Expand Down
2 changes: 1 addition & 1 deletion Main/include/Scoring.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class Scoring : public Unique
void m_SetHoldObject(ObjectState* obj, uint32 index);
void m_ReleaseHoldObject(ObjectState* obj);
void m_ReleaseHoldObject(uint32 index);
bool m_IsBeingHold(const ScoreTick* tick) const;
bool m_IsBeingHeld(const ScoreTick* tick) const;

// Check whether the laser segment is the beginning
bool m_IsRoot(const LaserObjectState* laser) const;
Expand Down
4 changes: 2 additions & 2 deletions Main/src/HitStat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include "HitStat.hpp"
#include "GameConfig.hpp"

const HitWindow HitWindow::NORMAL = HitWindow(46, 92);
const HitWindow HitWindow::HARD = HitWindow(23, 46);
const HitWindow HitWindow::NORMAL = HitWindow(46, 150);
const HitWindow HitWindow::HARD = HitWindow(23, 75);

HitStat::HitStat(ObjectState* object) : object(object)
{
Expand Down
10 changes: 5 additions & 5 deletions Main/src/Scoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ void Scoring::m_UpdateTicks()
assert(buttonCode < 6);
if (!tick->HasFlag(TickFlags::Ignore))
{
if (m_IsBeingHold(tick) || autoplayInfo.IsAutoplayButtons())
if (m_IsBeingHeld(tick) || autoplayInfo.IsAutoplayButtons())
{
m_TickHit(tick, buttonCode);
HitStat* stat = new HitStat(tick->object);
Expand Down Expand Up @@ -1081,7 +1081,7 @@ void Scoring::m_ReleaseHoldObject(uint32 index)
m_ReleaseHoldObject(m_holdObjects[index]);
}

bool Scoring::m_IsBeingHold(const ScoreTick* tick) const
bool Scoring::m_IsBeingHeld(const ScoreTick* tick) const
{
// NOTE: all these are just heuristics. If there's a better heuristic, change this.
// See issue #355 for more detail.
Expand Down Expand Up @@ -1426,15 +1426,15 @@ bool Scoring::HoldObjectAvailable(uint32 index, bool checkIfPassedCritLine)
if (m_ticks[index].empty())
return false;

auto currentTime = m_playback->GetLastTime();
auto currentTime = m_playback->GetLastTime() + m_inputOffset;
auto tick = m_ticks[index].front();
auto obj = (HoldObjectState*)tick->object;
// When a hold passes the crit line and we're eligible to hit the starting tick,
// change the idle hit effect to the crit hit effect
bool withinHoldStartWindow = tick->HasFlag(TickFlags::Start) && m_IsBeingHold(tick) && (!checkIfPassedCritLine || obj->time <= currentTime);
bool withinHoldStartWindow = tick->HasFlag(TickFlags::Start) && m_IsBeingHeld(tick) && (!checkIfPassedCritLine || obj->time <= currentTime);
// This allows us to have a crit hit effect anytime a hold hasn't fully scrolled past,
// including when the final scorable tick has been processed
bool holdObjectHittable = obj->time + obj->duration > currentTime && m_buttonHitTime[index] > obj->time;
bool holdObjectHittable = obj->time + obj->duration > currentTime && m_buttonHitTime[index] + m_inputOffset > obj->time;

return withinHoldStartWindow || holdObjectHittable;
}
Expand Down