$self->{gui}->rounds($msg);
}
-sub check_best_lap {
- my ($self, $time, $who) = @_;
+sub notify_best_lap {
+ my ($self, $id, $time, $who) = @_;
return if !defined $time || $time == 0;
|| $time < $self->{best_lap}) {
$self->{best_lap} = $time;
$self->{gui}->best_lap($time, $who);
+
+ for my $car (0..5) {
+ $self->car($car)->set_global_best($car == $id);
+ $self->car($car)->print_best_lap;
+ }
return 1;
}
return 0;