Don't display the offset change if there wasn't any.

This commit is contained in:
Glenn Maynard
2003-08-12 00:40:38 +00:00
parent 59277f9518
commit 31c2b8ff7b
+16 -6
View File
@@ -1488,15 +1488,25 @@ void ShowSavePrompt( ScreenMessage SM_SendWhenDone )
case PLAY_MODE_RAVE: case PLAY_MODE_RAVE:
sMessage = ssprintf( sMessage = ssprintf(
"You have changed the offset or BPM of\n" "You have changed the offset or BPM of\n"
"%s\n" "%s\n",
"from %.3f to %.3f (a change of %.3f).\n" GAMESTATE->m_pCurSong->GetFullDisplayTitle().c_str() );
"Would you like to save these changes back\n"
"to the song file?\n" if( fabs(GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds - g_fOldOffset) > 0.001 )
"Choosing NO will discard your changes.", {
GAMESTATE->m_pCurSong->GetFullDisplayTitle().c_str(), sMessage += ssprintf(
"\n"
"Offset was changed from %.3f to %.3f (%.3f).\n",
g_fOldOffset, g_fOldOffset,
GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds, GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds,
GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds - g_fOldOffset ); GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds - g_fOldOffset );
}
sMessage +=
"\n"
"Would you like to save these changes back\n"
"to the song file?\n"
"Choosing NO will discard your changes.";
break; break;
case PLAY_MODE_NONSTOP: case PLAY_MODE_NONSTOP:
case PLAY_MODE_ONI: case PLAY_MODE_ONI: