Skip to content

Commit

Permalink
ditch the comparison values for scaled/unscaled
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Apr 30, 2017
1 parent f25a925 commit 61314b2
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function scoreBoard(pn,position)
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
self:diffuse(getGradeColor(pss:GetGrade()))
self:settextf("%05.2f%% (%s)",pss:GetUnscaledWife()*100, "SCALED")
self:settextf("")
end,
CodeMessageCommand=function(self,params)
if params.Name == "PrevJudge" or params.Name == "NextJudge" then
Expand Down
46 changes: 2 additions & 44 deletions src/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3144,13 +3144,6 @@ void Player::SetMineJudgment( TapNoteScore tns , int iTrack )
m_pPlayerStageStats->m_fWifeScore = curwifescore / totalwifescore;
}

if (m_pPlayerStageStats) {
// temp unscaled juxt -mina
if (tns == TNS_HitMine)
unscaledcurwifescore -= 8;
m_pPlayerStageStats->unscaledwife = unscaledcurwifescore / unscaledmaxwifescore;
}

MESSAGEMAN->Broadcast( msg );
if( m_pPlayerStageStats &&
( ( tns == TNS_AvoidMine && AVOID_MINE_INCREMENTS_COMBO ) ||
Expand Down Expand Up @@ -3182,35 +3175,6 @@ void Player::SetJudgment( int iRow, int iTrack, const TapNote &tn, TapNoteScore
if (tns != TNS_Miss)
msg.SetParam("Offset", tn.result.fTapNoteOffset * 1000); // don't send out ms offsets for misses, multiply by 1000 for convenience - Mina

if (m_pPlayerStageStats) {
// temp -scaled- juxt but im too lazy to rename shit- mina
float scoreWeight = 1;
if ( GAMESTATE->CountNotesSeparately() )
{
int notes = 0;

for (int i = 0; i < m_NoteData.GetNumTracks(); i++)
{
if (m_NoteData.GetTapNote(i, iRow).IsNote())
notes++;
}

scoreWeight /= notes;
}

if (tns == TNS_Miss)
unscaledcurwifescore -= 8 * scoreWeight;
else
unscaledcurwifescore += wife2(tn.result.fTapNoteOffset, m_fTimingWindowScale) * scoreWeight;

unscaledmaxwifescore += 2 * scoreWeight;
if (m_pPlayerState->m_PlayerController == PC_HUMAN) {
m_pPlayerStageStats->unscaledwife = unscaledcurwifescore / unscaledmaxwifescore;
m_pPlayerStageStats->m_vOffsetVector.push_back(tn.result.fTapNoteOffset);
m_pPlayerStageStats->m_vNoteRowVector.push_back(iRow);
}
}

if (m_pPlayerStageStats) {
if (tns == TNS_Miss)
curwifescore -= 8;
Expand Down Expand Up @@ -3280,11 +3244,8 @@ void Player::SetHoldJudgment( TapNote &tn, int iTrack )
msg.SetParam("Val", m_pPlayerStageStats->m_iHoldNoteScores[tn.HoldResult.hns] + 1);

// Ms scoring implemenation - Mina
if (tn.HoldResult.hns == HNS_LetGo || tn.HoldResult.hns == HNS_Missed) {
if (tn.HoldResult.hns == HNS_LetGo || tn.HoldResult.hns == HNS_Missed)
curwifescore -= 6.f;
unscaledcurwifescore -= 6.f;
}


msg.SetParam("WifePercent", 100 * curwifescore / maxwifescore);
msg.SetParam("WifeDifferential", curwifescore - maxwifescore * m_pPlayerState->playertargetgoal);
Expand All @@ -3293,11 +3254,8 @@ void Player::SetHoldJudgment( TapNote &tn, int iTrack )
msg.SetParam("WifePBDifferential", curwifescore - maxwifescore * wifescorepersonalbest);
msg.SetParam("WifePBGoal", wifescorepersonalbest);
}
if (m_pPlayerState->m_PlayerController == PC_HUMAN) {
if (m_pPlayerState->m_PlayerController == PC_HUMAN)
m_pPlayerStageStats->m_fWifeScore = curwifescore / totalwifescore;
m_pPlayerStageStats->unscaledwife = unscaledcurwifescore / totalwifescore;
}

}

Lua* L = LUA->Get();
Expand Down
2 changes: 0 additions & 2 deletions src/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ class Player: public ActorFrame
vector<int> nerv; // the non empty row vector where we are somehwere in
size_t nervpos = 0; // where we are in the non-empty row vector
float maxwifescore = 0.0001f; // hurr /0 - Mina
float unscaledmaxwifescore = 0.0001f; // hurr /0 - Mina
float curwifescore = 0.f;
float unscaledcurwifescore = 0.f;
float wifescorepersonalbest = 0.f;
int totalwifescore;

Expand Down
3 changes: 0 additions & 3 deletions src/PlayerStageStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ void PlayerStageStats::InternalInit()
m_iCurPossibleDancePoints = 0;
m_iActualDancePoints = 0;
m_fWifeScore = 0;
unscaledwife = 0;
m_fTimingScale = 0;
m_vOffsetVector.clear();
m_vNoteRowVector.clear();
Expand Down Expand Up @@ -792,7 +791,6 @@ class LunaPlayerStageStats: public Luna<PlayerStageStats>
DEFINE_METHOD( GetCurrentScoreMultiplier, m_iCurScoreMultiplier )
DEFINE_METHOD( GetScore, m_iScore )
DEFINE_METHOD( GetWifeScore, m_fWifeScore )
DEFINE_METHOD( GetUnscaledWife, unscaledwife)
DEFINE_METHOD( GetCurMaxScore, m_iCurMaxScore )
DEFINE_METHOD( GetTapNoteScores, m_iTapNoteScores[Enum::Check<TapNoteScore>(L, 1)] )
DEFINE_METHOD( GetHoldNoteScores, m_iHoldNoteScores[Enum::Check<HoldNoteScore>(L, 1)] )
Expand Down Expand Up @@ -999,7 +997,6 @@ class LunaPlayerStageStats: public Luna<PlayerStageStats>
ADD_METHOD( FailPlayer );
ADD_METHOD( GetSongsPassed );
ADD_METHOD( GetSongsPlayed );
ADD_METHOD( GetUnscaledWife );
}
};

Expand Down
1 change: 0 additions & 1 deletion src/PlayerStageStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class PlayerStageStats
int m_iActualDancePoints;
int m_iPossibleGradePoints;
float m_fWifeScore;
float unscaledwife;
float m_fTimingScale;
vector<float> m_vOffsetVector;
vector<int> m_vNoteRowVector;
Expand Down

0 comments on commit 61314b2

Please sign in to comment.