Fixed pausing on ScreenGameplay by making GameState have a pause variable and not force the song position forward if the game is paused. Implementing a working pause button that the player can press is left as an exercise for the reader.
This commit is contained in:
@@ -269,6 +269,8 @@ public:
|
||||
static const float MUSIC_SECONDS_INVALID;
|
||||
|
||||
void ResetMusicStatistics(); // Call this when it's time to play a new song. Clears the values above.
|
||||
void SetPaused(bool p) { m_paused= p; }
|
||||
bool GetPaused() { return m_paused; }
|
||||
void UpdateSongPosition( float fPositionSeconds, const TimingData &timing, const RageTimer ×tamp = RageZeroTimer );
|
||||
float GetSongPercent( float beat ) const;
|
||||
|
||||
@@ -426,6 +428,7 @@ private:
|
||||
// Timing position corrections
|
||||
RageTimer m_LastPositionTimer;
|
||||
float m_LastPositionSeconds;
|
||||
bool m_paused;
|
||||
|
||||
GameState(const GameState& rhs);
|
||||
GameState& operator=(const GameState& rhs);
|
||||
|
||||
Reference in New Issue
Block a user