[splittiming] new EffectModes (not available from Lua yet), clarified error message
This commit is contained in:
@@ -68,6 +68,12 @@ void Actor::SetBGMTime( float fTime, float fBeat, float fTimeNoOffset, float fBe
|
||||
g_fCurrentBGMBeatNoOffset = fBeatNoOffset;
|
||||
}
|
||||
|
||||
void Actor::SetPlayerBGMBeat( PlayerNumber pn, float fBeat, float fBeatNoOffset )
|
||||
{
|
||||
g_vfCurrentBGMBeatPlayer[pn] = fBeat;
|
||||
g_vfCurrentBGMBeatPlayerNoOffset[pn] = fBeatNoOffset;
|
||||
}
|
||||
|
||||
void Actor::SetBGMLight( int iLightNumber, float fCabinetLights )
|
||||
{
|
||||
ASSERT( iLightNumber < NUM_CabinetLight );
|
||||
@@ -675,6 +681,16 @@ void Actor::UpdateInternal( float fDeltaTime )
|
||||
m_fEffectDelta = g_fCurrentBGMBeat - m_fSecsIntoEffect;
|
||||
m_fSecsIntoEffect = g_fCurrentBGMBeat;
|
||||
break;
|
||||
|
||||
case CLOCK_BGM_BEAT_PLAYER1:
|
||||
m_fEffectDelta = g_vfCurrentBGMBeat[PlayerNumber_P1] - m_fSecsIntoEffect;
|
||||
m_fSecsIntoEffect = g_vfCurrentBGMBeat[PlayerNumber_P1];
|
||||
break;
|
||||
|
||||
case CLOCK_BGM_BEAT_PLAYER2:
|
||||
m_fEffectDelta = g_vfCurrentBGMBeat[PlayerNumber_P2] - m_fSecsIntoEffect;
|
||||
m_fSecsIntoEffect = g_vfCurrentBGMBeat[PlayerNumber_P2];
|
||||
break;
|
||||
|
||||
case CLOCK_BGM_TIME:
|
||||
m_fEffectDelta = g_fCurrentBGMTime - m_fSecsIntoEffect;
|
||||
|
||||
@@ -109,6 +109,7 @@ public:
|
||||
virtual void LoadFromNode( const XNode* pNode );
|
||||
|
||||
static void SetBGMTime( float fTime, float fBeat, float fTimeNoOffset, float fBeatNoOffset );
|
||||
static void SetPlayerBGMBeat( PlayerNumber pn, float fBeat, float fBeatNoOffset );
|
||||
static void SetBGMLight( int iLightNumber, float fCabinetLights );
|
||||
|
||||
/**
|
||||
@@ -131,6 +132,8 @@ public:
|
||||
CLOCK_BGM_BEAT,
|
||||
CLOCK_BGM_TIME_NO_OFFSET,
|
||||
CLOCK_BGM_BEAT_NO_OFFSET,
|
||||
CLOCK_BGM_BEAT_PLAYER1,
|
||||
CLOCK_BGM_BEAT_PLAYER2,
|
||||
CLOCK_LIGHT_1 = 1000,
|
||||
CLOCK_LIGHT_LAST = 1100,
|
||||
NUM_CLOCKS
|
||||
@@ -713,6 +716,7 @@ protected:
|
||||
// global state
|
||||
static float g_fCurrentBGMTime, g_fCurrentBGMBeat;
|
||||
static float g_fCurrentBGMTimeNoOffset, g_fCurrentBGMBeatNoOffset;
|
||||
static vector<float> g_vfCurrentBGMBeatPlayer, g_vfCurrentBGMBeatPlayerNoOffset;
|
||||
|
||||
private:
|
||||
// commands
|
||||
|
||||
@@ -949,7 +949,9 @@ void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &ti
|
||||
if( bUpdatePlayers )
|
||||
FOREACH_EnabledPlayer( pn )
|
||||
if( m_pCurSteps[pn] )
|
||||
{
|
||||
m_pPlayerState[pn]->m_Position.UpdateSongPosition( fPositionSeconds, m_pCurSteps[pn]->m_Timing, timestamp );
|
||||
Actor::SetPlayerBGMBeat( pn, m_pPlayerState[pn]->m_Position.m_fSongBeatVisible, m_pPlayerState[pn]->m_Position.m_fSongBeatNoOffset );
|
||||
|
||||
Actor::SetBGMTime( GAMESTATE->m_Position.m_fMusicSecondsVisible, GAMESTATE->m_Position.m_fSongBeatVisible, fPositionSeconds, GAMESTATE->m_Position.m_fSongBeatNoOffset );
|
||||
// LOG->Trace( "m_fMusicSeconds = %f, m_fSongBeat = %f, m_fCurBPS = %f, m_bFreeze = %f", m_fMusicSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze );
|
||||
|
||||
@@ -20,7 +20,7 @@ void SongPosition::UpdateSongPosition( float fPositionSeconds, const TimingData
|
||||
timing.GetBeatAndBPSFromElapsedTime( fPositionSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze, m_bDelay, m_iWarpBeginRow, m_fWarpDestination );
|
||||
|
||||
// "Crash reason : -243478.890625 -48695.773438"
|
||||
ASSERT_M( m_fSongBeat > -2000, ssprintf("Song beat %f at %f seconds", m_fSongBeat, fPositionSeconds) );
|
||||
ASSERT_M( m_fSongBeat > -2000, ssprintf("Song beat %f at %f seconds is less than -2000!", m_fSongBeat, fPositionSeconds) );
|
||||
|
||||
m_fMusicSeconds = fPositionSeconds;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user