]> www.fi.muni.cz Git - slotcarman.git/blobdiff - SCX/Track.pm
Make cars aware of their IDs.
[slotcarman.git] / SCX / Track.pm
index bd6ceea620e9d3626cba484c34f5f9f8c094944d..4e0e722ce9dde34f93f750df2734aab0c4fbe23d 100644 (file)
@@ -25,9 +25,10 @@ sub new {
        for my $i (0..5) {
                $self->{cars}->[$i] = SCX::Car->new({
                        gui => $self->{gui},
-                       order => $i,
+                       id => $i,
                        track => $self,
                });
+               $self->car($i)->set_order($i);
        }
 
        return $self;