mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
cl_main.c (CL_NextDemo): fix for an obscure bug when there are no demos
listed with startdemos: run the game, go into a savegame or start a new game, type F3 and press Esc enough times to go back to normal view, bring down the console and enter "timedemo demo1". when the demo ends, the only thing I was able to *see* was the loading label, no other activity at all, although I can still do F10 (quit) and blindly press Y to exit the game, so the engine didn't crash. problem was that CL_NextDemo() didn't check if an actual nextdemo exists before calling SCR_BeginLoadingPlaque() which set scr_drawloading to true, so scr_drawloading still remained as true.. fixed thusly. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@71 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
b815a8c0d9
commit
6bc3c41370
1 changed files with 3 additions and 2 deletions
|
@ -231,8 +231,6 @@ void CL_NextDemo (void)
|
|||
if (cls.demonum == -1)
|
||||
return; // don't play demos
|
||||
|
||||
SCR_BeginLoadingPlaque ();
|
||||
|
||||
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS)
|
||||
{
|
||||
cls.demonum = 0;
|
||||
|
@ -240,10 +238,13 @@ void CL_NextDemo (void)
|
|||
{
|
||||
Con_Printf ("No demos listed with startdemos\n");
|
||||
cls.demonum = -1;
|
||||
CL_Disconnect();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SCR_BeginLoadingPlaque ();
|
||||
|
||||
sprintf (str,"playdemo %s\n", cls.demos[cls.demonum]);
|
||||
Cbuf_InsertText (str);
|
||||
cls.demonum++;
|
||||
|
|
Loading…
Reference in a new issue