Skip to content

Commit

Permalink
count 'giving up' during gameplay as failing
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
MinaciousGrace committed Jul 12, 2018
1 parent 0d0402e commit 2e5dfd4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/PlayerStageStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ void PlayerStageStats::InternalInit()
luascriptwasloaded = false;
filehadnegbpms = false;
filegotmines = false;
gaveuplikeadumbass = false;

ZERO( m_iTapNoteScores );
ZERO( m_iHoldNoteScores );
Expand Down
1 change: 1 addition & 0 deletions src/PlayerStageStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class PlayerStageStats
bool luascriptwasloaded;
bool filehadnegbpms; // the call after gameplay is over is apparently unreliable -mina
bool filegotmines; // this needs to be set before any notedata transforms
bool gaveuplikeadumbass; // flag 'giving up' status so i can flag it as failing so i dont have to remove the feature entirely -mina

map<float,float> m_fLifeRecord;
void SetLifeRecordAt( float fLife, float fStepsSecond );
Expand Down
3 changes: 2 additions & 1 deletion src/ScreenGameplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1619,6 +1619,7 @@ void ScreenGameplay::Update( float fDeltaTime )
{
pi->GetPlayerStageStats()->m_bFailed |= bAllHumanHaveBigMissCombo;
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.
pi->GetPlayerStageStats()->gaveuplikeadumbass |= m_gave_up;
}
ResetGiveUpTimers(false);
if(GIVING_UP_GOES_TO_PREV_SCREEN && !m_skipped_song)
Expand Down Expand Up @@ -2241,7 +2242,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )

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

if( bAllReallyFailed )
if( bAllReallyFailed)
{
this->PostScreenMessage( SM_BeginFailed, 0 );
return;
Expand Down
4 changes: 4 additions & 0 deletions src/StageStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,10 @@ static HighScore FillInHighScore(const PlayerStageStats &pss, const PlayerState

// Etterna validity check, used for ssr/eo eligibility -mina
hs.SetEtternaValid(DetermineScoreEligibility(pss, ps));

// 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
if(pss.gaveuplikeadumbass || pss.luascriptwasloaded || pss.everusedautoplay)
hs.SetGrade(Grade_Failed);

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

0 comments on commit 2e5dfd4

Please sign in to comment.