Skip to content

Commit

Permalink
Properly maintaining cls.marathon_time/marathon_level values
Browse files Browse the repository at this point in the history
In case of cl_demorewind their values are getting normalized when going through intermission/finale/cutscene
  • Loading branch information
j0zzz committed Sep 13, 2023
1 parent e442231 commit cea3810
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion trunk/cl_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,13 +1222,20 @@ char *GetPrintedTime(double time)

void PrintFinishTime()
{
char *timestring;
if (cl_demorewind.value)
{
cls.marathon_time -= cl.completed_time;
cls.marathon_level--;
return;
}

cls.marathon_time += cl.completed_time;
cls.marathon_level++;

if (!pr_qdqstats && !cls.demoplayback && sv.active)
{
char *timestring;

// Sphere --- calling SV_ from CL_ here is probably not the best, but at
// least we check for sv.active. We need the broadcast so that the time
// messages appear in recorded demos and also get sent to clients
Expand Down

0 comments on commit cea3810

Please sign in to comment.