fix dancing characters not resetting between songs in a course

This commit is contained in:
Chris Danford
2003-08-23 19:58:46 +00:00
parent 00a107ad70
commit 4fd5ede6de
3 changed files with 15 additions and 2 deletions
+5
View File
@@ -69,7 +69,10 @@ Background::Background()
if( GAMESTATE->IsPlayerEnabled(p) )
bOneOrMoreChars = true;
if( bOneOrMoreChars )
{
m_pDancingCharacters = new DancingCharacters;
m_pDancingCharacters->LoadNextSong();
}
else
m_pDancingCharacters = NULL;
@@ -375,6 +378,8 @@ void Background::LoadFromSong( Song* pSong )
m_BGADanger.SetZoomY( fYZoom );
TEXTUREMAN->EnableOddDimensionWarning();
m_pDancingCharacters->LoadNextSong();
}
+8 -2
View File
@@ -60,10 +60,12 @@ DancingCharacters::DancingCharacters()
m_Character[p].LoadMilkshapeAsciiBones( "warmup", pChar->GetWarmUpAnimationPath() );
m_Character[p].LoadMilkshapeAsciiBones( "dance", pChar->GetDanceAnimationPath() );
m_Character[p].LoadMilkshapeAsciiBones( "howtoplay", pChar->GetHowToPlayAnimationPath() );
m_Character[p].PlayAnimation( "rest" );
this->AddChild( &m_Character[p] );
}
}
void DancingCharacters::LoadNextSong()
{
// initial camera sweep is still
m_CameraDistance = CAMERA_REST_DISTANCE;
m_CameraPanYStart = 0;
@@ -77,9 +79,13 @@ DancingCharacters::DancingCharacters()
* in course mode. Init in first update? */
if( GAMESTATE->m_pCurSong )
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; }
void DancingCharacters::Update( float fDelta )
+2
View File
@@ -21,6 +21,8 @@ class DancingCharacters : public ActorFrame
public:
DancingCharacters();
virtual void LoadNextSong();
virtual void Update( float fDelta );
virtual void DrawPrimitives();