]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/vehicle.cpp
Do not render unplaced vehicles
[r2c2.git] / source / 3d / vehicle.cpp
index 41bb26259da3b2a769c7a93e427acfb76ab1fe0b..37619ebd339461f104dc0bf54aeb6fcfe71e7a67 100644 (file)
@@ -37,8 +37,16 @@ Point Vehicle3D::get_node() const
        return Point(p.x, p.y, p.z+0.01+vehicle.get_type().get_height());
 }
 
+bool Vehicle3D::is_visible() const
+{
+       return vehicle.get_track();
+}
+
 void Vehicle3D::render(const GL::Tag &tag) const
 {
+       if(!vehicle.get_track())
+               return;
+
        if(tag==0)
        {
                GL::PushMatrix push_mat;