浏览代码

AVI: Prevent last scene being shown if all AVI files are available

Lou Yihua 7 年之前
父节点
当前提交
d40f45aa38
共有 1 个文件被更改,包括 9 次插入8 次删除
  1. 9 8
      ending.c

+ 9 - 8
ending.c

@@ -416,9 +416,9 @@ PAL_EndingScreen(
     // Use AVI & WIN95's music if we can
 	// Otherwise, simulate the ending of DOS version
 	//
-	PAL_PlayAVI("4.avi");
+	BOOL avi_played = PAL_PlayAVI("4.avi");
 
-	if (!PAL_PlayAVI("5.avi"))
+	if (!(avi_played = PAL_PlayAVI("5.avi")))
 	{
 		BOOL win_music = AUDIO_PlayCDTrack(12);
 
@@ -482,15 +482,16 @@ PAL_EndingScreen(
 		AUDIO_PlayMusic(0, FALSE, 1);
 		UTIL_Delay(500);
 	}
-	else
-	{
-		gpGlobals->fNeedToFadeIn = FALSE;
-		PAL_SetPalette(5, FALSE);
-		PAL_EndingSetEffectSprite(0);
-	}
 
 	if (!PAL_PlayAVI("6.avi"))
 	{
+		if (avi_played)
+		{
+			gpGlobals->fNeedToFadeIn = FALSE;
+			PAL_SetPalette(5, FALSE);
+			PAL_EndingSetEffectSprite(0);
+		}
+
 		if (!AUDIO_PlayCDTrack(13))
 		{
 			AUDIO_PlayMusic(9, TRUE, 0);