diff -r 31d6568a121f src/GameState.cpp --- a/src/GameState.cpp Fri Dec 27 19:57:37 2013 -0600 +++ b/src/GameState.cpp Sun Jan 12 15:21:00 2014 -0700 @@ -2205,7 +2205,8 @@ { PlayerNumber pn = Enum::Check(L, 1); if( lua_isnil(L,2) ) { p->m_pCurSteps[pn].Set( NULL ); } - else { Steps *pS = Luna::check(L,2); p->m_pCurSteps[pn].Set( pS ); } + else + { Steps *pS = Luna::check(L,2); p->m_pCurSteps[pn].Set( pS ); } ASSERT(p->m_pCurSteps[pn]->m_StepsType == p->m_pCurStyle->m_StepsType); // Why Broadcast again? This is double-broadcasting. -Chris @@ -2251,6 +2252,12 @@ else { lua_pushnil(L); } return 1; } + static int GetTimeSinceStart( T* p, lua_State *L ) + { + // Really, there should be a singleton for RageZeroTimer, but that's more work, and this is the only part of it I actually need. + lua_pushnumber(L, RageZeroTimer.GetTimeSinceStart(BArg(1))); + return 1; + } static int SetPreferredDifficulty( T* p, lua_State *L ) { PlayerNumber pn = Enum::Check( L, 1 ); @@ -2517,6 +2524,7 @@ ADD_METHOD( SetTemporaryEventMode ); ADD_METHOD( Env ); ADD_METHOD( GetEditSourceSteps ); + ADD_METHOD( GetTimeSinceStart ); ADD_METHOD( SetPreferredDifficulty ); ADD_METHOD( GetPreferredDifficulty ); ADD_METHOD( AnyPlayerHasRankingFeats );