DEADSOFTWARE

r_showtime is now a cvar and 0 by default
authorfgsfds <pvt.fgsfds@gmail.com>
Wed, 8 May 2019 13:57:37 +0000 (16:57 +0300)
committerfgsfds <pvt.fgsfds@gmail.com>
Wed, 8 May 2019 13:57:37 +0000 (16:57 +0300)
src/game/g_console.pas
src/game/g_game.pas

index 4866ea19371efc68ff3588db5eefb35ebcfb008a..b5e771091280eeaaa43be238aedaea15d8b7b72c 100644 (file)
@@ -851,7 +851,6 @@ begin
   AddCommand('p2_name', GameCVars);
   AddCommand('p1_color', GameCVars);
   AddCommand('p2_color', GameCVars);
-  AddCommand('r_showtime', GameCVars);
   AddCommand('r_showscore', GameCVars);
   AddCommand('r_showlives', GameCVars);
   AddCommand('r_showstat', GameCVars);
index 7a70840b33b47db24b85276e7d1d63f77f1f26e1..8f659e8d3b57e7f52721f341c9020c0f86b51fde 100644 (file)
@@ -250,7 +250,7 @@ var
   gTotalMonsters: Integer = 0;
   gPauseMain: Boolean = false;
   gPauseHolmes: Boolean = false;
-  gShowTime: Boolean = True;
+  gShowTime: Boolean = False;
   gShowFPS: Boolean = False;
   gShowGoals: Boolean = True;
   gShowStat: Boolean = True;
@@ -4037,7 +4037,7 @@ begin
     e_TextureFontPrint(0, 16, Format('UPS: %d', [UPS]), gStdFont);
   end;
 
-  if gGameOn and gShowTime and (gGameSettings.GameType in [GT_CUSTOM, GT_SERVER, GT_CLIENT]) then
+  if gGameOn and gShowTime then
     drawTime(gScreenWidth-72, gScreenHeight-16);
 
   if gGameOn then drawProfilers();
@@ -5570,18 +5570,7 @@ begin
   end
   else if gGameSettings.GameType in [GT_CUSTOM, GT_SERVER, GT_CLIENT] then
   begin
-    if cmd = 'r_showtime' then
-    begin
-      if (Length(P) > 1) and
-         ((P[1] = '1') or (P[1] = '0')) then
-        gShowTime := (P[1][1] = '1');
-
-      if gShowTime then
-        g_Console_Add(_lc[I_MSG_TIME_ON])
-      else
-        g_Console_Add(_lc[I_MSG_TIME_OFF]);
-    end
-    else if cmd = 'r_showscore' then
+    if cmd = 'r_showscore' then
     begin
       if (Length(P) > 1) and
          ((P[1] = '1') or (P[1] = '0')) then
@@ -7889,4 +7878,5 @@ begin
   conRegVar('r_smallmap_align_v', @r_smallmap_v, 'valign: 0: top; 1: center; 2: bottom', 'vertial aligning of small maps');
 
   conRegVar('r_showfps', @gShowFPS, 'draw fps counter', 'draw fps counter');
+  conRegVar('r_showtime', @gShowTime, 'show game time', 'show game time');
 end.