clear all stage stats to fix accumulating life and combo memory

This commit is contained in:
Chris Danford
2005-04-04 12:45:35 +00:00
parent 8b5f3c3e55
commit 00e4c2686e
3 changed files with 12 additions and 3 deletions
+6 -1
View File
@@ -5,7 +5,7 @@
#include "Steps.h" #include "Steps.h"
#include "song.h" #include "song.h"
void StageStats::Init() StageStats::StageStats()
{ {
playMode = PLAY_MODE_INVALID; playMode = PLAY_MODE_INVALID;
pStyle = NULL; pStyle = NULL;
@@ -14,6 +14,11 @@ void StageStats::Init()
fGameplaySeconds = 0; fGameplaySeconds = 0;
} }
void StageStats::Init()
{
*this = StageStats();
}
void StageStats::AssertValid( PlayerNumber pn ) const void StageStats::AssertValid( PlayerNumber pn ) const
{ {
ASSERT( vpSongs.size() != 0 ); ASSERT( vpSongs.size() != 0 );
+1 -1
View File
@@ -12,7 +12,7 @@ struct lua_State;
struct StageStats struct StageStats
{ {
StageStats() { Init(); } StageStats();
void Init(); void Init();
void AssertValid( PlayerNumber pn ) const; void AssertValid( PlayerNumber pn ) const;
+4
View File
@@ -12,7 +12,11 @@ public:
void Reset() void Reset()
{ {
m_CurStageStats.Init();
m_vPlayedStageStats.clear(); m_vPlayedStageStats.clear();
m_AccumStageStats.Init();
m_FinalEvalStageStats.Init();
CalcAccumStageStats(); CalcAccumStageStats();
} }