diff --git a/rendering/opengl46/opengl46renderer.cpp b/rendering/opengl46/opengl46renderer.cpp index 51ea6633..74a1f62a 100644 --- a/rendering/opengl46/opengl46renderer.cpp +++ b/rendering/opengl46/opengl46renderer.cpp @@ -5884,7 +5884,6 @@ void opengl46_renderer::Render_Sleepers( TTrack *Track ) void opengl46_renderer::Render_Timbers( scene::basic_cell::path_sequence::const_iterator First, scene::basic_cell::path_sequence::const_iterator Last ) { if( Global.SleeperDistance <= 0.f ) { return; } - if( track_sleepers::timber_model() == nullptr ) { return; } auto const shadows = ( m_renderpass.draw_mode == rendermode::shadows ); // the distance is taken from the camera of the view, the shadow pass culling against its own frustum diff --git a/world/TrackSleepers.cpp b/world/TrackSleepers.cpp index 17da0a5f..60ca29d5 100644 --- a/world/TrackSleepers.cpp +++ b/world/TrackSleepers.cpp @@ -58,7 +58,8 @@ bool bedded( TTrack const &Track ) { bool lays( TTrack const &Track ) { - return timber_model() != nullptr && bedded( Track ); + // the model of the track itself (timbermodel) is enough, without sleepers3d in eu07.ini + return bedded( Track ) && timber_model( Track ) != nullptr; } std::vector> shared_zones( TTrack const &Track, int const Path ) { diff --git a/world/TrackSleepers.h b/world/TrackSleepers.h index 44074f00..12a3d69a 100644 --- a/world/TrackSleepers.h +++ b/world/TrackSleepers.h @@ -93,7 +93,7 @@ struct laid { double constexpr bed_drop { 0.06 }; // the model the timbers are made of where a track has none of its own, set with sleepers3d in eu07.ini and loaded on the first -// use; null when there's none, and no beams are laid +// use; null when there's none, and only the tracks with a timbermodel of their own lay beams beam_model const *timber_model(); // the model of the sleepers of the tracks running alone, set with sleepers3dplain; null when there's none beam_model const *plain_model(); @@ -104,7 +104,7 @@ beam_model const *plain_model( TTrack const &Track ); double plain_length( TTrack const &Track ); // whether the track has the ballast the simulator makes, which the beams are laid on when there's a model of them bool bedded( TTrack const &Track ); -// whether the track gets beams: a rail track with the ballast made by the simulator, and the model is there +// whether the track gets beams: a rail track with the ballast made by the simulator, and the model is there, its own or of eu07.ini bool lays( TTrack const &Track ); // where along the path of the track its rails lie on timbers shared with other tracks: where another track runs so near that // the plain sleepers of the two would touch, of the lengths of the models they'd be made of. this goes by the shape of the