mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 15:31:39 +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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@71 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
e4f5aa6caa
commit
3664b17504
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