fix dancing characters not resetting between songs in a course
This commit is contained in:
@@ -69,7 +69,10 @@ Background::Background()
|
|||||||
if( GAMESTATE->IsPlayerEnabled(p) )
|
if( GAMESTATE->IsPlayerEnabled(p) )
|
||||||
bOneOrMoreChars = true;
|
bOneOrMoreChars = true;
|
||||||
if( bOneOrMoreChars )
|
if( bOneOrMoreChars )
|
||||||
|
{
|
||||||
m_pDancingCharacters = new DancingCharacters;
|
m_pDancingCharacters = new DancingCharacters;
|
||||||
|
m_pDancingCharacters->LoadNextSong();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
m_pDancingCharacters = NULL;
|
m_pDancingCharacters = NULL;
|
||||||
|
|
||||||
@@ -375,6 +378,8 @@ void Background::LoadFromSong( Song* pSong )
|
|||||||
m_BGADanger.SetZoomY( fYZoom );
|
m_BGADanger.SetZoomY( fYZoom );
|
||||||
|
|
||||||
TEXTUREMAN->EnableOddDimensionWarning();
|
TEXTUREMAN->EnableOddDimensionWarning();
|
||||||
|
|
||||||
|
m_pDancingCharacters->LoadNextSong();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -60,10 +60,12 @@ DancingCharacters::DancingCharacters()
|
|||||||
m_Character[p].LoadMilkshapeAsciiBones( "warmup", pChar->GetWarmUpAnimationPath() );
|
m_Character[p].LoadMilkshapeAsciiBones( "warmup", pChar->GetWarmUpAnimationPath() );
|
||||||
m_Character[p].LoadMilkshapeAsciiBones( "dance", pChar->GetDanceAnimationPath() );
|
m_Character[p].LoadMilkshapeAsciiBones( "dance", pChar->GetDanceAnimationPath() );
|
||||||
m_Character[p].LoadMilkshapeAsciiBones( "howtoplay", pChar->GetHowToPlayAnimationPath() );
|
m_Character[p].LoadMilkshapeAsciiBones( "howtoplay", pChar->GetHowToPlayAnimationPath() );
|
||||||
m_Character[p].PlayAnimation( "rest" );
|
|
||||||
this->AddChild( &m_Character[p] );
|
this->AddChild( &m_Character[p] );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DancingCharacters::LoadNextSong()
|
||||||
|
{
|
||||||
// initial camera sweep is still
|
// initial camera sweep is still
|
||||||
m_CameraDistance = CAMERA_REST_DISTANCE;
|
m_CameraDistance = CAMERA_REST_DISTANCE;
|
||||||
m_CameraPanYStart = 0;
|
m_CameraPanYStart = 0;
|
||||||
@@ -78,8 +80,12 @@ DancingCharacters::DancingCharacters()
|
|||||||
if( GAMESTATE->m_pCurSong )
|
if( GAMESTATE->m_pCurSong )
|
||||||
m_fThisCameraEndBeat = GAMESTATE->m_pCurSong->m_fFirstBeat;
|
m_fThisCameraEndBeat = GAMESTATE->m_pCurSong->m_fFirstBeat;
|
||||||
|
|
||||||
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
if( GAMESTATE->IsPlayerEnabled(p) )
|
||||||
|
m_Character[p].PlayAnimation( "rest" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Neg1OrPos1() { return rand()%2 ? -1 : +1; }
|
int Neg1OrPos1() { return rand()%2 ? -1 : +1; }
|
||||||
|
|
||||||
void DancingCharacters::Update( float fDelta )
|
void DancingCharacters::Update( float fDelta )
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ class DancingCharacters : public ActorFrame
|
|||||||
public:
|
public:
|
||||||
DancingCharacters();
|
DancingCharacters();
|
||||||
|
|
||||||
|
virtual void LoadNextSong();
|
||||||
|
|
||||||
virtual void Update( float fDelta );
|
virtual void Update( float fDelta );
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user