fix Actor depending on GAMESTATE
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include "RageLog.h"
|
||||
#include "arch/Dialog/Dialog.h"
|
||||
|
||||
#include "GameState.h" /* XXX: ugly dependency */
|
||||
static float g_fCurrentBGMTime = 0;
|
||||
|
||||
/* This is Reset instead of Init since many derived classes have Init() functions
|
||||
* that shouldn't change the position of the actor. */
|
||||
@@ -59,6 +59,11 @@ Actor::Actor()
|
||||
m_bFirstUpdate = true;
|
||||
}
|
||||
|
||||
void Actor::SetBGMTime( float fTime )
|
||||
{
|
||||
g_fCurrentBGMTime = fTime;
|
||||
}
|
||||
|
||||
void Actor::Draw()
|
||||
{
|
||||
if( m_bHidden )
|
||||
@@ -324,7 +329,7 @@ void Actor::Update( float fDeltaTime )
|
||||
break;
|
||||
|
||||
case CLOCK_BGM:
|
||||
m_fSecsIntoEffect = GAMESTATE->m_fSongBeat;
|
||||
m_fSecsIntoEffect = g_fCurrentBGMTime;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user