mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-24 19:52:08 +00:00
Enable timescale outside of DEVELOP builds
It has NETVAR, so it should be fine -- put an end to useful debugging features excluded in multiplayer!
This commit is contained in:
parent
bb6d4d10b5
commit
a76968c6d9
2 changed files with 1 additions and 7 deletions
|
@ -194,9 +194,7 @@ extern UINT8 *scr_borderpatch; // patch used to fill the view borders
|
|||
extern consvar_t cv_scr_width, cv_scr_height, cv_scr_depth, cv_renderview, cv_renderer, cv_fullscreen;
|
||||
// wait for page flipping to end or not
|
||||
extern consvar_t cv_vidwait;
|
||||
#ifdef DEVELOP
|
||||
extern consvar_t cv_timescale;
|
||||
#endif
|
||||
|
||||
// Initialize the screen
|
||||
void SCR_Startup(void);
|
||||
|
|
|
@ -2147,15 +2147,13 @@ static double tic_frequency;
|
|||
static Uint64 tic_epoch;
|
||||
static double elapsed_tics;
|
||||
|
||||
#ifdef DEVELOP // Tied behind DEVELOP, until sv_cheats is made better
|
||||
static void UpdateTicFreq(void)
|
||||
{
|
||||
tic_frequency = (timer_frequency / (double)NEWTICRATE) / FIXED_TO_FLOAT(cv_timescale.value);
|
||||
tic_frequency = (timer_frequency / (double)NEWTICRATE) / FixedToFloat(cv_timescale.value);
|
||||
}
|
||||
|
||||
static CV_PossibleValue_t timescale_cons_t[] = {{FRACUNIT/20, "MIN"}, {20*FRACUNIT, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_timescale = CVAR_INIT ("timescale", "1.0", CV_NETVAR|CV_CHEAT|CV_FLOAT|CV_CALL, timescale_cons_t, UpdateTicFreq);
|
||||
#endif
|
||||
|
||||
static void UpdateElapsedTics(void)
|
||||
{
|
||||
|
@ -2261,9 +2259,7 @@ double I_GetFrameTime(void)
|
|||
//
|
||||
void I_StartupTimer(void)
|
||||
{
|
||||
#ifdef DEVELOP
|
||||
CV_RegisterVar(&cv_timescale);
|
||||
#endif
|
||||
|
||||
timer_frequency = SDL_GetPerformanceFrequency();
|
||||
tic_epoch = SDL_GetPerformanceCounter();
|
||||
|
|
Loading…
Reference in a new issue