Skip to content

Commit

Permalink
Nag the user if demo recording fails to start.
Browse files Browse the repository at this point in the history
  • Loading branch information
skullernet committed May 15, 2024
1 parent 48e4c19 commit 4987d71
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/client/demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,11 @@ void CL_EmitDemoFrame(void)
cls.demo.frames_dropped++;

// warn the user if drop rate is too high
if (cls.demo.frames_written < 10 && cls.demo.frames_dropped == 50)
Com_WPrintf("Too many demo frames don't fit into %u bytes.\n"
"Try to increase 'cl_demomsglen' value and restart recording.\n",
cls.demo.buffer.maxsize);
if (cls.demo.frames_written < 10 && !(cls.demo.frames_dropped % 50)) {
Com_WPrintf("Too many demo frames don't fit into %u bytes!\n", cls.demo.buffer.maxsize);
if (cls.demo.frames_dropped == 50)
Com_WPrintf("Try to increase 'cl_demomsglen' value and restart recording.\n");
}
} else {
SZ_Write(&cls.demo.buffer, msg_write.data, msg_write.cursize);
cls.demo.last_server_frame = cl.frame.number;
Expand Down

0 comments on commit 4987d71

Please sign in to comment.