diff --git a/src/PlayerStageStats.cpp b/src/PlayerStageStats.cpp index 58cfe3a273..dfca489c38 100644 --- a/src/PlayerStageStats.cpp +++ b/src/PlayerStageStats.cpp @@ -261,6 +261,7 @@ float PlayerStageStats::GetCurMaxPercentDancePoints() const { if ( m_iPossibleDancePoints == 0 ) + return 0; // div/0 if ( m_iCurPossibleDancePoints == m_iPossibleDancePoints ) @@ -720,6 +721,16 @@ public: } return 1; } + static int SetScore(T* p, lua_State *L ) + { + int newScore = lua_tonumber(1, L); + if( newScore >= 0) + { + p->m_iScore = newScore; + return 1; + } + return 0; + } static int GetRadarPossible( T* p, lua_State *L ) { p->m_radarPossible.PushSelf(L); return 1; } static int GetRadarActual( T* p, lua_State *L ) { p->m_radarActual.PushSelf(L); return 1; }