mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 19:40:43 +00:00
- fixed issues with skipping over an entire cutscene.
This must never destroy the last element of the cutscene because it is still needed to draw something while shutdown is performed.
This commit is contained in:
parent
fa3fd9ac8f
commit
51aeb6dd39
2 changed files with 10 additions and 6 deletions
|
@ -188,13 +188,15 @@ class DukeCutscenes // Note: must be class, not struct, otherwise we cannot easi
|
|||
7, DukeSnd.INTRO4_3 + 1,
|
||||
12, DukeSnd.INTRO4_2 + 1,
|
||||
26, DukeSnd.INTRO4_4 + 1);
|
||||
runner.Append(MoviePlayerJob.CreateWithSoundinfo("vol42a.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 14, 14, 14));
|
||||
let m = MoviePlayerJob.CreateWithSoundinfo("vol42a.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 14, 14, 14);
|
||||
if (m) m.skipover = true;
|
||||
runner.Append(m);
|
||||
|
||||
soundinfo.Pushv(
|
||||
10, DukeSnd.INTRO4_6 + 1);
|
||||
runner.Append(MoviePlayerJob.CreateWithSoundinfo("vol43a.anm", soundinfo, 0, 10, 10, 10));
|
||||
|
||||
runner.skipall = true;
|
||||
m = MoviePlayerJob.CreateWithSoundinfo("vol43a.anm", soundinfo, 0, 10, 10, 10);
|
||||
if (m) m.skipover = true;
|
||||
runner.Append(m);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -8,6 +8,8 @@ class ScreenJob : Object
|
|||
int ticks;
|
||||
int jobstate;
|
||||
|
||||
bool skipover;
|
||||
|
||||
enum EJobState
|
||||
{
|
||||
running = 0, // normal operation
|
||||
|
@ -395,9 +397,9 @@ class ScreenJobRunner : Object
|
|||
|
||||
if (index >= 0) jobs[index].Destroy();
|
||||
index++;
|
||||
while (index < jobs.Size() && (jobs[index] == null || (skip && skipall)))
|
||||
while (index < jobs.Size() && (jobs[index] == null || (skip && jobs[index].skipover)))
|
||||
{
|
||||
if (jobs[index] != null) jobs[index].Destroy();
|
||||
if (jobs[index] != null && index < jobs.Size() - 1) jobs[index].Destroy(); // may not delete the last element - we still need it for shutting down.
|
||||
index++;
|
||||
}
|
||||
actionState = clearbefore ? State_Clear : State_Run;
|
||||
|
|
Loading…
Reference in a new issue