Skip to content

Commit

Permalink
fix isrecalcvalid
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jan 29, 2017
1 parent d296982 commit ab67d00
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/Steps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,17 @@ void Steps::Decompress(bool isGameplay)
}
}

bool Steps::IsRecalcValid() {
if (m_StepsType != StepsType_dance_single)
return false;

TimingData* td = GetTimingData();
if (td->HasWarps())
return false;

return true;
}

float Steps::GetMSD(float x, int i) const {
int idx = static_cast<int>(x * 10) - 7;
CLAMP(idx, 0, 13); // prevent crashes due to people setting rate mod below 0.7 or above 2.0 somehow - mina
Expand Down
2 changes: 1 addition & 1 deletion src/Steps.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class Steps
map<float, Skillset> SortSkillsetsAtRate(float x, bool includeoverall);

// this is bugged and returns true for files with negative bpms when it shouldn't - mina
bool IsRecalcValid() { GetTimingData()->NegStopAndBPMCheck(); return m_StepsType != StepsType_dance_single && GetTimingData()->HasWarps() && GetTimingData()->ValidSequentialAssumption; }
bool IsRecalcValid();

// prolly needs an enum or something idk - mina
float GetMSD(float x, int i) const;
Expand Down

0 comments on commit ab67d00

Please sign in to comment.