mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-06 23:13:00 +01:00
fix(track): timbermodel of a track lays switch timbers without sleepers3d in eu07.ini
This commit is contained in:
@@ -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 )
|
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( Global.SleeperDistance <= 0.f ) { return; }
|
||||||
if( track_sleepers::timber_model() == nullptr ) { return; }
|
|
||||||
|
|
||||||
auto const shadows = ( m_renderpass.draw_mode == rendermode::shadows );
|
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
|
// the distance is taken from the camera of the view, the shadow pass culling against its own frustum
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ bool bedded( TTrack const &Track ) {
|
|||||||
|
|
||||||
bool lays( 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<std::pair<double, double>> shared_zones( TTrack const &Track, int const Path ) {
|
std::vector<std::pair<double, double>> shared_zones( TTrack const &Track, int const Path ) {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ struct laid {
|
|||||||
double constexpr bed_drop { 0.06 };
|
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
|
// 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();
|
beam_model const *timber_model();
|
||||||
// the model of the sleepers of the tracks running alone, set with sleepers3dplain; null when there's none
|
// the model of the sleepers of the tracks running alone, set with sleepers3dplain; null when there's none
|
||||||
beam_model const *plain_model();
|
beam_model const *plain_model();
|
||||||
@@ -104,7 +104,7 @@ beam_model const *plain_model( TTrack const &Track );
|
|||||||
double plain_length( 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
|
// 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 );
|
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 );
|
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
|
// 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
|
// 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
|
||||||
|
|||||||
Reference in New Issue
Block a user