]> www.fi.muni.cz Git - slotcarman.git/blobdiff - SCX/Track.pm
Time formatting moved to SCX::GUI
[slotcarman.git] / SCX / Track.pm
index 21f3ab499f70061e98e624f68be3dec763c5f983..c1f66a3e8890307f2b9316042db1427d7dcdde10 100644 (file)
@@ -88,15 +88,14 @@ sub race_setup {
                $self->{gui}->rounds('0');
                $self->{race_rounds} = 0;
        }
-       $self->{race_time} = 0;
        $self->{best_lap} = undef;
 
        $self->{gui}->show_semaphore(undef);
        $self->{race_running} = 0;
        $self->{start_in_progress} = 0;
 
-       $self->{gui}->time('00:00');
-       $self->{gui}->best_lap('0.00');
+       $self->{gui}->time(undef);
+       $self->{gui}->best_lap(undef);
 
        for my $car (0..5) {
                $self->car($car)->set_order($car);
@@ -113,7 +112,7 @@ sub check_best_lap {
        if (!defined $self->{best_lap}
                || $time < $self->{best_lap}) {
                $self->{best_lap} = $time;
-               $self->{gui}->best_lap(sprintf("%.2f", $time), $who);
+               $self->{gui}->best_lap($time, $who);
                return 1;
        }
        return 0;
@@ -128,10 +127,10 @@ sub qualification_start {
                $self->car($car)->set_laptime(undef);
        }
 
-       $self->{qualification_running};
+       $self->{qualification_running} = 1;
        $self->{gui}->lap('Qualification');
-       $self->{gui}->time('00:00');
-       $self->{gui}->best_lap('0:00');
+       $self->{gui}->time(undef);
+       $self->{gui}->best_lap(undef);
 }
 
 1;