From 97dabd38a7af827897a8964c8df94646029fd328 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 19 Oct 2003 07:40:11 +0000 Subject: [PATCH] save stats intermitently in case of crash --- stepmania/src/GameState.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 899f1c058c..56a5e42d9e 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -31,6 +31,7 @@ #include "ProfileManager.h" #include "arch/arch.h" #include "ThemeManager.h" +#include "Bookkeeper.h" GameState* GAMESTATE = NULL; // global and accessable from anywhere in our program @@ -130,6 +131,10 @@ void GameState::Reset() for( p=0; pUnloadProfile( (PlayerNumber)p ); + + // save stats info intermitently in case of crash + BOOKKEEPER->WriteToDisk(); + SONGMAN->SaveMachineScoresToDisk(); } void GameState::Update( float fDelta )