Skip to content

Commit 2e5dfd4

Browse files
count 'giving up' during gameplay as failing
- add bool flag to pss to log whether or not a file was given up, this is probably redundant or at least circuitous but it is the most explicit and least lazy compared to removing giving up entirely - flag it when giving up (quitting using start instead of back) - set fail grade when filling in highscores that check this new flag (also sort of redundant with dq, but more explicit again) as well as doing the same for lua script loading and autoplay usage - stops people from potentially abusing the mechanic to cheat high rated scores by quitting-but-not-failing and receiving a score evaluation on an entire file based on only they parts of it they completed
1 parent 0d0402e commit 2e5dfd4

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

src/PlayerStageStats.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ void PlayerStageStats::InternalInit()
6767
luascriptwasloaded = false;
6868
filehadnegbpms = false;
6969
filegotmines = false;
70+
gaveuplikeadumbass = false;
7071

7172
ZERO( m_iTapNoteScores );
7273
ZERO( m_iHoldNoteScores );

src/PlayerStageStats.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ class PlayerStageStats
131131
bool luascriptwasloaded;
132132
bool filehadnegbpms; // the call after gameplay is over is apparently unreliable -mina
133133
bool filegotmines; // this needs to be set before any notedata transforms
134+
bool gaveuplikeadumbass; // flag 'giving up' status so i can flag it as failing so i dont have to remove the feature entirely -mina
134135

135136
map<float,float> m_fLifeRecord;
136137
void SetLifeRecordAt( float fLife, float fStepsSecond );

src/ScreenGameplay.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,7 @@ void ScreenGameplay::Update( float fDeltaTime )
16191619
{
16201620
pi->GetPlayerStageStats()->m_bFailed |= bAllHumanHaveBigMissCombo;
16211621
pi->GetPlayerStageStats()->m_bDisqualified |= bGiveUpTimerFired; // Don't disqualify if failing for miss combo. The player should still be eligable for a high score on courses.
1622+
pi->GetPlayerStageStats()->gaveuplikeadumbass |= m_gave_up;
16221623
}
16231624
ResetGiveUpTimers(false);
16241625
if(GIVING_UP_GOES_TO_PREV_SCREEN && !m_skipped_song)
@@ -2241,7 +2242,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
22412242

22422243
bool bAllReallyFailed = STATSMAN->m_CurStageStats.AllFailed();
22432244

2244-
if( bAllReallyFailed )
2245+
if( bAllReallyFailed)
22452246
{
22462247
this->PostScreenMessage( SM_BeginFailed, 0 );
22472248
return;

src/StageStats.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,10 @@ static HighScore FillInHighScore(const PlayerStageStats &pss, const PlayerState
515515

516516
// Etterna validity check, used for ssr/eo eligibility -mina
517517
hs.SetEtternaValid(DetermineScoreEligibility(pss, ps));
518+
519+
// force fail grade if player 'gave up', autoplay was used, or lua scripts were loaded (this is sorta redundant with the above but ehh) -mina
520+
if(pss.gaveuplikeadumbass || pss.luascriptwasloaded || pss.everusedautoplay)
521+
hs.SetGrade(Grade_Failed);
518522

519523
// should maybe just make the setscorekey function do this internally rather than recalling the datetime object -mina
520524
RString ScoreKey = "S" + BinaryToHex(CryptManager::GetSHA1ForString(hs.GetDateTime().GetString()));

0 commit comments

Comments
 (0)