From 9957b840b4bb2a3139b614c8811eddb1114e8f03 Mon Sep 17 00:00:00 2001 From: Charles Lohr Date: Wed, 1 Sep 2004 17:16:01 +0000 Subject: [PATCH] Added changing of DifficultyIcons --- stepmania/src/NetworkSyncManager.cpp | 16 +++++++++++++++- stepmania/src/NetworkSyncManager.h | 2 ++ stepmania/src/ScreenNetEvaluation.cpp | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/stepmania/src/NetworkSyncManager.cpp b/stepmania/src/NetworkSyncManager.cpp index fdefcc85f8..7ed924817a 100644 --- a/stepmania/src/NetworkSyncManager.cpp +++ b/stepmania/src/NetworkSyncManager.cpp @@ -347,6 +347,18 @@ void NetworkSyncManager::StartRequest(short position) ctr = uint8_t(ctr+tSteps->GetMeter()); m_packet.Write1(ctr); + + ctr=0; + + tSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; + if ((tSteps!=NULL) && (GAMESTATE->IsPlayerEnabled(PLAYER_1))) + ctr = uint8_t(ctr + (int) tSteps->GetDifficulty()*16); + + tSteps = GAMESTATE->m_pCurSteps[PLAYER_2]; + if ((tSteps!=NULL) && (GAMESTATE->IsPlayerEnabled(PLAYER_2))) + ctr = uint8_t(ctr + (int) tSteps->GetDifficulty()); + + m_packet.Write1(ctr); //Notify server if this is for sync or not. ctr = char(position*16); @@ -384,11 +396,11 @@ void NetworkSyncManager::StartRequest(short position) { m_EvalPlayerData[i].grade=0; m_EvalPlayerData[i].score=0; + m_EvalPlayerData[i].difficulty=(Difficulty)0; for (int j=0;jm_EvalPlayerData[m_iCurrentPlayer].score) ); + m_DifficultyIcon[m_pActivePlayer].SetFromDifficulty( m_pActivePlayer, NSMAN->m_EvalPlayerData[m_iCurrentPlayer].difficulty ); + for (int j=0;jm_EvalPlayerData[m_iCurrentPlayer].tapScores[j] ) ); }