X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fallocation.cpp;h=3835f8c8df2ba99ae70c0c597025c9cc189bac78;hb=100c7f252e145f095205c55a178ab57bb8da7e75;hp=4bafb111c7e60e02cd018960d599d9c24796a216;hpb=5116fff210cdc3f0fbdae13046cc60450aad5e8f;p=r2c2.git diff --git a/source/3d/allocation.cpp b/source/3d/allocation.cpp index 4bafb11..3835f8c 100644 --- a/source/3d/allocation.cpp +++ b/source/3d/allocation.cpp @@ -29,10 +29,7 @@ void Allocation3D::set_color(const GL::Color &c) void Allocation3D::block_reserved(Block &block, Train *t) { - if(t && t!=&train) - return; - - if(t) + if(t==&train) { if(paths.count(&block)) return; @@ -41,7 +38,7 @@ void Allocation3D::block_reserved(Block &block, Train *t) const Block::TrackSet &tracks = block.get_tracks(); for(Block::TrackSet::const_iterator i=tracks.begin(); i!=tracks.end(); ++i) { - Path3D *path = new Path3D(layout.get(**i)); + Path3D *path = new Path3D(layout.get_3d(**i)); bpaths.push_back(path); path->set_layer(1); float intensity = 0.5+train.get_block_allocator().is_block_current(block)*0.5;