Fix assert fail in endless: reset the background number on reset.

This commit is contained in:
Glenn Maynard
2002-09-04 01:58:15 +00:00
parent 8b2b70dd1a
commit 16a5971040
+1 -4
View File
@@ -97,16 +97,13 @@ void Background::Unload()
m_BackgroundAnimations.RemoveAll();
m_aBGSegments.RemoveAll();
m_iCurBGSegment = 0;
}
void Background::LoadFromSong( Song* pSong )
{
/* Endless was crashing due to this; is there any reason not to
* fix it this way? -glenn */
/* Correct. I added the same chage. -Chris */
Unload();
const float fXZoom = RECTWIDTH(RECT_BACKGROUND) / (float)SCREEN_WIDTH;
const float fYZoom = RECTHEIGHT(RECT_BACKGROUND) / (float)SCREEN_HEIGHT;
const float fZoom = max(fXZoom,fYZoom);