Moved current grade to half of health int.

This commit is contained in:
Charles Lohr
2004-05-05 05:41:51 +00:00
parent 0dba590547
commit 93cfad5125
2 changed files with 8 additions and 13 deletions
+5 -11
View File
@@ -208,7 +208,11 @@ void NetworkSyncManager::ReportScore(int playerID, int step, int score, int comb
SendNetPack.m_combo=combo; SendNetPack.m_combo=combo;
SendNetPack.m_score=score; //Load packet with appropriate info SendNetPack.m_score=score; //Load packet with appropriate info
SendNetPack.m_step=step-1; SendNetPack.m_step=step-1;
SendNetPack.m_life=m_playerLife[playerID];
int CurGrade = g_CurStageStats.GetGrade((PlayerNumber)playerID);
//Should be cleaned up
SendNetPack.m_life=m_playerLife[playerID] + CurGrade*65536;
//Send packet to server //Send packet to server
NetPlayerClient->send((char*)&SendNetPack, sizeof(netHolder)); NetPlayerClient->send((char*)&SendNetPack, sizeof(netHolder));
@@ -227,16 +231,6 @@ void NetworkSyncManager::ReportSongOver()
SendNetPack.m_step=0; SendNetPack.m_step=0;
FOREACH_EnabledPlayer( pn2 )
{
if (pn2==PLAYER_1)
SendNetPack.m_step+=g_CurStageStats.GetGrade(pn2);
if (pn2==PLAYER_2)
SendNetPack.m_step+=g_CurStageStats.GetGrade(pn2)*256;
}
SendNetPack.m_score=0; SendNetPack.m_score=0;
SendNetPack.m_combo=0; SendNetPack.m_combo=0;
SendNetPack.m_life=0; SendNetPack.m_life=0;
+2 -1
View File
@@ -69,7 +69,8 @@ private:
int m_step; //SID (StepID, 0-6 for Miss to Marv, 7,8 for boo and ok) int m_step; //SID (StepID, 0-6 for Miss to Marv, 7,8 for boo and ok)
int m_score; //Player's Score int m_score; //Player's Score
int m_combo; //Player's Current Combo int m_combo; //Player's Current Combo
int m_life; //Player's Life int m_life; //Player's Life (AND GRADE)
//m_life = [16-bit int life] <- LSB [16-bit int grade] <-MSB
}; };
struct netName //Data structure used for 16-character strings. struct netName //Data structure used for 16-character strings.