mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 19:01:50 +00:00
Add g_fast_forward_clock_stop, means to end g_fast_forward early if too much real world time is taken
This commit is contained in:
parent
4281cd1283
commit
0ce93b2d96
3 changed files with 14 additions and 0 deletions
|
|
@ -150,6 +150,7 @@ boolean g_singletics = false; // timedemo
|
||||||
boolean lastdraw = false;
|
boolean lastdraw = false;
|
||||||
|
|
||||||
tic_t g_fast_forward = 0;
|
tic_t g_fast_forward = 0;
|
||||||
|
tic_t g_fast_forward_clock_stop = INFTICS;
|
||||||
|
|
||||||
postimg_t postimgtype[MAXSPLITSCREENPLAYERS];
|
postimg_t postimgtype[MAXSPLITSCREENPLAYERS];
|
||||||
INT32 postimgparam[MAXSPLITSCREENPLAYERS];
|
INT32 postimgparam[MAXSPLITSCREENPLAYERS];
|
||||||
|
|
|
||||||
|
|
@ -927,6 +927,7 @@ extern INT16 wipetypepost;
|
||||||
// debug flag to cancel adaptiveness
|
// debug flag to cancel adaptiveness
|
||||||
extern boolean g_singletics;
|
extern boolean g_singletics;
|
||||||
extern tic_t g_fast_forward;
|
extern tic_t g_fast_forward;
|
||||||
|
extern tic_t g_fast_forward_clock_stop;
|
||||||
|
|
||||||
#define singletics (g_singletics == true || g_fast_forward > 0)
|
#define singletics (g_singletics == true || g_fast_forward > 0)
|
||||||
|
|
||||||
|
|
|
||||||
12
src/g_game.c
12
src/g_game.c
|
|
@ -2030,7 +2030,19 @@ void G_Ticker(boolean run)
|
||||||
|
|
||||||
if (g_fast_forward > 0)
|
if (g_fast_forward > 0)
|
||||||
{
|
{
|
||||||
|
if (I_GetTime() > g_fast_forward_clock_stop)
|
||||||
|
{
|
||||||
|
// If too much real time has passed, end the fast-forward early.
|
||||||
|
g_fast_forward = 1;
|
||||||
|
}
|
||||||
|
|
||||||
g_fast_forward--;
|
g_fast_forward--;
|
||||||
|
|
||||||
|
if (g_fast_forward == 0)
|
||||||
|
{
|
||||||
|
// Next fast-forward is unlimited.
|
||||||
|
g_fast_forward_clock_stop = INFTICS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue