Skip to content

Commit abc0a34

Browse files
committed
Rename function, add input offset to HoldObjectAvailable
1 parent 06c7b1d commit abc0a34

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Main/include/Scoring.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class Scoring : public Unique
270270
void m_SetHoldObject(ObjectState* obj, uint32 index);
271271
void m_ReleaseHoldObject(ObjectState* obj);
272272
void m_ReleaseHoldObject(uint32 index);
273-
bool m_IsBeingHold(const ScoreTick* tick) const;
273+
bool m_IsBeingHeld(const ScoreTick* tick) const;
274274

275275
// Check whether the laser segment is the beginning
276276
bool m_IsRoot(const LaserObjectState* laser) const;

Main/src/Scoring.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ void Scoring::m_UpdateTicks()
718718
assert(buttonCode < 6);
719719
if (!tick->HasFlag(TickFlags::Ignore))
720720
{
721-
if (m_IsBeingHold(tick) || autoplayInfo.IsAutoplayButtons())
721+
if (m_IsBeingHeld(tick) || autoplayInfo.IsAutoplayButtons())
722722
{
723723
m_TickHit(tick, buttonCode);
724724
HitStat* stat = new HitStat(tick->object);
@@ -1080,7 +1080,7 @@ void Scoring::m_ReleaseHoldObject(uint32 index)
10801080
m_ReleaseHoldObject(m_holdObjects[index]);
10811081
}
10821082

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

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

14381438
return withinHoldStartWindow || holdObjectHittable;
14391439
}

0 commit comments

Comments
 (0)