File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ typedef struct
4646} cinematics_t ;
4747
4848cinematics_t cin ;
49+ qboolean cin_finished = false;
4950
5051/*
5152=================================================================
@@ -197,6 +198,13 @@ Called when either the cinematic completes, or it is aborted
197198*/
198199void SCR_FinishCinematic (void )
199200{
201+ // For expansions packs/mods with multiple cinematics played in a row, the input queue
202+ // may cause the "nextserver" message to be sent out more than once which results in a lockup.
203+ // Here we make sure that SCR_FinishCinematic() is called exactly once to avoid this.
204+ if (cin_finished )
205+ return ;
206+
207+ cin_finished = true;
200208 // tell the server to advance to the next map / cinematic
201209 MSG_WriteByte (& cls .netchan .message , clc_stringcmd );
202210 SZ_Print (& cls .netchan .message , va ("nextserver %i\n" , cl .servercount ));
@@ -584,6 +592,7 @@ void SCR_PlayCinematic (char *arg)
584592 CDAudio_Stop ();
585593 Miniaudio_Stop ();
586594
595+ cin_finished = false;
587596 cl .cinematicframe = 0 ;
588597 dot = strstr (arg , "." );
589598 if (dot && !strcmp (dot , ".pcx" ))
You can’t perform that action at this time.
0 commit comments