From a76968c6d9ba69d702121d0fcad46fac12d992e9 Mon Sep 17 00:00:00 2001
From: Sally Coolatta <tehrealsalt@gmail.com>
Date: Wed, 27 Apr 2022 19:18:17 -0400
Subject: [PATCH] Enable timescale outside of DEVELOP builds

It has NETVAR, so it should be fine -- put an end to useful debugging features excluded in multiplayer!
---
 src/screen.h       | 2 --
 src/sdl/i_system.c | 6 +-----
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/screen.h b/src/screen.h
index 8a8bda376..da27aa8f0 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -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);
diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c
index 8d04a8783..afd13910c 100644
--- a/src/sdl/i_system.c
+++ b/src/sdl/i_system.c
@@ -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();