@@ -6,7 +6,7 @@ use strictures;
6
6
7
7
use lib ' ..' ;
8
8
use 5.010;
9
- use SDL::Constants map " SDLK_$_ " , qw( q UP LEFT RIGHT d n o l ) ;
9
+ use SDL::Constants map " SDLK_$_ " , qw( q UP LEFT RIGHT d n o l t ) ;
10
10
use List::Util qw( min max ) ;
11
11
use Carp::Always;
12
12
use Microidium::Helpers ' dfile' ;
@@ -134,6 +134,7 @@ sub on_keydown {
134
134
$self -> client_state-> {fire } = 1 if $sym == SDLK_d;
135
135
$self -> change_fov( $self -> fov - 10 ) if $sym == SDLK_o;
136
136
$self -> change_fov( $self -> fov + 10 ) if $sym == SDLK_l;
137
+ $self -> client_state-> {skip_timings } = !$self -> client_state-> {skip_timings } if $sym == SDLK_t;
137
138
138
139
if ( $self -> in_network_game ) {
139
140
$self -> log ( " sent: DOWN $sym " );
@@ -445,7 +446,8 @@ sub render_ui {
445
446
}
446
447
447
448
push @texts ,
448
- [ [ 0, $self -> height - 12 ], " Controls: left up right d - Quit: q - Connect to server: n - Zoom in/out: o l" ];
449
+ [ [ 0, $self -> height - 12 ], " Controls: left up right d - Quit: q - Connect to server: n - Zoom in/out: o l" ],
450
+ [ [ 0, $self -> height - 22 ], " Disable time graph: t" ];
449
451
450
452
push @texts , [ [ 0, 90 ], " Perl v$] " ];
451
453
@@ -489,13 +491,10 @@ sub render_ui {
489
491
" no_cache" ,
490
492
];
491
493
}
492
- push @texts ,
493
- [
494
- [ 0, 20 ],
495
- sprintf " FPS: %5 .1f // Load: % 7.2f %%" ,
496
- 1 / $self -> frame_time,
494
+ push @texts , [
495
+ [ 0, 20 ], sprintf " FPS: %5 .1f // Load: % 7.2f %%" , 1 / $self -> frame_time, #
497
496
100 * $self -> frame_calc_time * $self -> fps_aim
498
- ];
497
+ ];
499
498
my $tick = $game_state -> {tick } || 0;
500
499
push @texts , [
501
500
[ 0, 10 ],
@@ -505,7 +504,7 @@ sub render_ui {
505
504
506
505
my $con = $self -> console;
507
506
my @to_display = grep defined , @{$con }[ max( 0, $# $con - 10 ) .. $# $con ];
508
- push @texts , [ [ 0, $self -> height - 22 - $_ * 10 ], $to_display [$_ ] ] for 0 .. $#to_display ;
507
+ push @texts , [ [ 0, $self -> height - 32 - $_ * 10 ], $to_display [$_ ] ] for 0 .. $#to_display ;
509
508
510
509
my %timing_types = %{ $self -> timing_types };
511
510
my @timing_colors = $self -> timing_colors;
0 commit comments