Skip to content

Commit

Permalink
make goal priority be minimum 1
Browse files Browse the repository at this point in the history
doesnt break (or change) currently existing goals with 0 prio
i dont know why you'd need granularity up to 100 prio though
  • Loading branch information
Ulti-FD committed Jul 6, 2021
1 parent 2cec6e5 commit 55d4d54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Etterna/Models/Misc/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ class LunaScoreGoal : public Luna<ScoreGoal>
}

static int SetPercent(T* p, lua_State* L)
{
{
if (!p->achieved) {
auto newpercent = FArg(1);
CLAMP(newpercent, .8f, 1.f);
Expand All @@ -1245,7 +1245,7 @@ class LunaScoreGoal : public Luna<ScoreGoal>
else
newpercent = 0.99f;
}


p->percent = newpercent;
p->CheckVacuity();
Expand All @@ -1258,7 +1258,7 @@ class LunaScoreGoal : public Luna<ScoreGoal>
{
if (!p->achieved) {
auto newpriority = IArg(1);
CLAMP(newpriority, 0, 100);
CLAMP(newpriority, 1, 100);
p->priority = newpriority;
p->UploadIfNotVacuous();
}
Expand Down

0 comments on commit 55d4d54

Please sign in to comment.