Demo pause should work now.

This commit is contained in:
Anton E. Gavrilov 2000-03-09 22:16:25 +00:00
parent 304490f4ed
commit e81dbeb4f2
2 changed files with 9 additions and 1 deletions

View file

@ -60,6 +60,7 @@ void CL_StopPlayback (void)
cls.demoplayback = 0; cls.demoplayback = 0;
cls.demofile = NULL; cls.demofile = NULL;
cls.state = ca_disconnected; cls.state = ca_disconnected;
cl.paused = false;
if (cls.timedemo) if (cls.timedemo)
CL_FinishTimeDemo (); CL_FinishTimeDemo ();
@ -103,6 +104,8 @@ int CL_GetMessage(void)
if (cls.demoplayback) if (cls.demoplayback)
{ {
if (cl.paused)
return 0;
// decide if it is time to grab the next message // decide if it is time to grab the next message
if (cls.signon == SIGNONS) // allways grab until fully connected if (cls.signon == SIGNONS) // allways grab until fully connected
{ {

View file

@ -1248,6 +1248,11 @@ Host_Pause_f
*/ */
void Host_Pause_f (void) void Host_Pause_f (void)
{ {
if (cls.demoplayback)
{
cl.paused = !cl.paused;
return;
}
if (cmd_source == src_command) if (cmd_source == src_command)
{ {
@ -1258,7 +1263,7 @@ void Host_Pause_f (void)
SV_ClientPrintf ("Pause not allowed.\n"); SV_ClientPrintf ("Pause not allowed.\n");
else else
{ {
sv.paused ^= 1; sv.paused = !sv.paused;
if (sv.paused) if (sv.paused)
{ {