Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-fastdemo doesn't work with -skipsec #1307

Open
MrAlaux opened this issue Dec 6, 2023 · 5 comments · May be fixed by #1310
Open

-fastdemo doesn't work with -skipsec #1307

MrAlaux opened this issue Dec 6, 2023 · 5 comments · May be fixed by #1310
Labels

Comments

@MrAlaux
Copy link
Collaborator

MrAlaux commented Dec 6, 2023

Tested in the latest master artifact (x64).

If I play a demo through -fastdemo, it works as expected: the demo plays back as fast as possible.
However, if I throw -skipsec into the mix, the demo will skip the specified time but then resume at normal speed, as if ignoring -fastdemo.

-timedemo seems to be unaffected.

@fabiangreffrath
Copy link
Owner

Does it make a difference if you use the -warp parameter to skip to a specific map in the demo?

@fabiangreffrath
Copy link
Owner

Looks like this fixes it:

diff --git a/src/g_game.c b/src/g_game.c
index 6983224..1f33ad2 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -93,7 +93,6 @@ boolean         sendreload;    // send a reload level event next tic
 boolean         sendjoin;      // send a join demo event next tic
 boolean         usergame;      // ok to save / end game
 boolean         timingdemo;    // if true, exit with report on completion
-boolean         fastdemo;      // if true, run at full speed -- killough
 boolean         nodrawers;     // for comparative timing purposes
 boolean         noblit;        // for comparative timing purposes
 int             starttime;     // for comparative timing purposes
diff --git a/src/i_timer.c b/src/i_timer.c
index 96c68d4..5968a5b 100644
--- a/src/i_timer.c
+++ b/src/i_timer.c
@@ -93,6 +93,7 @@ static int I_GetTime_Scaled(void)
     return MSToTic(GetTimeMS_Scaled());
 }
 
+boolean fastdemo; // if true, run at full speed -- killough
 static int fasttic;
 
 static int I_GetTime_FastDemo(void)
@@ -144,7 +145,7 @@ void I_SetFastdemoTimer(boolean on)
         I_GetTime = I_GetTime_FastDemo;
         I_GetFracTime = I_GetFracTime_FastDemo;
     }
-    else if (I_GetTime == I_GetTime_FastDemo)
+    else if (I_GetTime == I_GetTime_FastDemo && !fastdemo)
     {
         uint64_t counter;
 

@fabiangreffrath
Copy link
Owner

I had to move the variable declaration because the setup tool links in i_timer.c but not g_game.c.

@rfomin
Copy link
Collaborator

rfomin commented Dec 7, 2023

I think we can fix it elsewhere. I'll look into it, just got carried away with the DRS experiment 😄

@rfomin rfomin linked a pull request Dec 7, 2023 that will close this issue
@MrAlaux
Copy link
Collaborator Author

MrAlaux commented Dec 8, 2023

Does it make a difference if you use the -warp parameter to skip to a specific map in the demo?

Using -warp disables fast playback too. I'll try the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants