diff --git a/application/editormodetrackprops.cpp b/application/editormodetrackprops.cpp index 5fdfa40c..d17df9e5 100644 --- a/application/editormodetrackprops.cpp +++ b/application/editormodetrackprops.cpp @@ -520,11 +520,11 @@ std::vector make_properties() int end; }; blend_field const fields[] = { - {"blendballast1", "Ballast blending at p1 (m)", "How far from the end p1 the ballast fades into that of the track joined there, where their textures differ; 0: not blended", track_blend::kind::ballast, 0}, - {"blendballast2", "Ballast blending at p2 (m)", "How far from the end p2 the ballast fades into that of the track joined there, where their textures differ; 0: not blended", track_blend::kind::ballast, 1}, - {"blendballast3", "Ballast blending at p4 (m)", "How far from the end p4 of the switch its trackbed fades into the ballast of the track joined there, where their textures differ; 0: not blended", track_blend::kind::ballast, 2}, - {"blendrails1", "Rails blending at p1 (m)", "How far from the end p1 the rails fade into those of the track joined there, where their textures differ; 0: not blended", track_blend::kind::rails, 0}, - {"blendrails2", "Rails blending at p2 (m)", "How far from the end p2 the rails fade into those of the track joined there, where their textures differ; 0: not blended", track_blend::kind::rails, 1}}; + {"blendballast1", "Ballast blending at p1 (m)", "How far from the end p1 the ballast fades into that of the track joined there, where their textures differ; 0: the joint stays sharp, whatever the track joined there has", track_blend::kind::ballast, 0}, + {"blendballast2", "Ballast blending at p2 (m)", "How far from the end p2 the ballast fades into that of the track joined there, where their textures differ; 0: the joint stays sharp, whatever the track joined there has", track_blend::kind::ballast, 1}, + {"blendballast3", "Ballast blending at p4 (m)", "How far from the end p4 of the switch its trackbed fades into the ballast of the track joined there, where their textures differ; 0: the joint stays sharp, whatever the track joined there has", track_blend::kind::ballast, 2}, + {"blendrails1", "Rails blending at p1 (m)", "How far from the end p1 the rails fade into those of the track joined there, where their textures differ; 0: the joint stays sharp, whatever the track joined there has", track_blend::kind::rails, 0}, + {"blendrails2", "Rails blending at p2 (m)", "How far from the end p2 the rails fade into those of the track joined there, where their textures differ; 0: the joint stays sharp, whatever the track joined there has", track_blend::kind::rails, 1}}; for (auto const &blend : fields) { auto &property{add(list, blend.key, field::slider, section::look, group::blending, blend.label, blend.tooltip)}; diff --git a/lang/editor_pl.po b/lang/editor_pl.po index 568143dd..1584e6dd 100644 --- a/lang/editor_pl.po +++ b/lang/editor_pl.po @@ -10276,17 +10276,17 @@ msgstr "Mieszanie szyn przy p1 (m)" msgid "Rails blending at p2 (m)" msgstr "Mieszanie szyn przy p2 (m)" -msgid "How far from the end p1 the ballast fades into that of the track joined there, where their textures differ; 0: not blended" -msgstr "Na jakiej długości od końca p1 podsypka płynnie przechodzi w podsypkę toru tam dołączonego, gdy ich tekstury są różne; 0: bez mieszania" +msgid "How far from the end p1 the ballast fades into that of the track joined there, where their textures differ; 0: the joint stays sharp, whatever the track joined there has" +msgstr "Na jakiej długości od końca p1 podsypka płynnie przechodzi w podsypkę toru tam dołączonego, gdy ich tekstury są różne; 0: ostra granica na styku, niezależnie od ustawienia toru tam dołączonego" -msgid "How far from the end p2 the ballast fades into that of the track joined there, where their textures differ; 0: not blended" -msgstr "Na jakiej długości od końca p2 podsypka płynnie przechodzi w podsypkę toru tam dołączonego, gdy ich tekstury są różne; 0: bez mieszania" +msgid "How far from the end p2 the ballast fades into that of the track joined there, where their textures differ; 0: the joint stays sharp, whatever the track joined there has" +msgstr "Na jakiej długości od końca p2 podsypka płynnie przechodzi w podsypkę toru tam dołączonego, gdy ich tekstury są różne; 0: ostra granica na styku, niezależnie od ustawienia toru tam dołączonego" -msgid "How far from the end p4 of the switch its trackbed fades into the ballast of the track joined there, where their textures differ; 0: not blended" -msgstr "Na jakiej długości od końca p4 rozjazdu jego podsypka płynnie przechodzi w podsypkę toru tam dołączonego, gdy ich tekstury są różne; 0: bez mieszania" +msgid "How far from the end p4 of the switch its trackbed fades into the ballast of the track joined there, where their textures differ; 0: the joint stays sharp, whatever the track joined there has" +msgstr "Na jakiej długości od końca p4 rozjazdu jego podsypka płynnie przechodzi w podsypkę toru tam dołączonego, gdy ich tekstury są różne; 0: ostra granica na styku, niezależnie od ustawienia toru tam dołączonego" -msgid "How far from the end p1 the rails fade into those of the track joined there, where their textures differ; 0: not blended" -msgstr "Na jakiej długości od końca p1 szyny płynnie przechodzą w szyny toru tam dołączonego, gdy ich tekstury są różne; 0: bez mieszania" +msgid "How far from the end p1 the rails fade into those of the track joined there, where their textures differ; 0: the joint stays sharp, whatever the track joined there has" +msgstr "Na jakiej długości od końca p1 szyny płynnie przechodzą w szyny toru tam dołączonego, gdy ich tekstury są różne; 0: ostra granica na styku, niezależnie od ustawienia toru tam dołączonego" -msgid "How far from the end p2 the rails fade into those of the track joined there, where their textures differ; 0: not blended" -msgstr "Na jakiej długości od końca p2 szyny płynnie przechodzą w szyny toru tam dołączonego, gdy ich tekstury są różne; 0: bez mieszania" +msgid "How far from the end p2 the rails fade into those of the track joined there, where their textures differ; 0: the joint stays sharp, whatever the track joined there has" +msgstr "Na jakiej długości od końca p2 szyny płynnie przechodzą w szyny toru tam dołączonego, gdy ich tekstury są różne; 0: ostra granica na styku, niezależnie od ustawienia toru tam dołączonego" diff --git a/world/TrackBlend.cpp b/world/TrackBlend.cpp index ee56a7e2..84710f4a 100644 --- a/world/TrackBlend.cpp +++ b/world/TrackBlend.cpp @@ -140,8 +140,9 @@ material_handle material_of( TTrack const &Track, kind const Kind, int const End } } -// whether the track blends its rails or ballast at the end into those of the track joined there, and what with. the answer is -// the same for that track back, but for the lengths and the kinds of tracks which blend: switches don't blend their rails +// whether the track blends its rails or ballast at the end into those of the track joined there, and what with: not where +// either of them has a length of 0 there. the answer is the same for that track back, but for the kinds of tracks which blend: +// switches don't blend their rails, a plain track fades its rails all the way into theirs bool blends( TTrack const &Track, kind const Kind, int const End, TTrack const **Other = nullptr, int *Otherend = nullptr, material_handle *Othermaterial = nullptr ) { if( End < 0 || End >= end_count( Track ) ) { @@ -166,6 +167,10 @@ bool blends( TTrack const &Track, kind const Kind, int const End, TTrack const * if( otherend < 0 ) { return false; } + // a length of 0 at either side leaves the joint sharp + if( other->m_blend[ static_cast( Kind ) ][ otherend ] <= 0.f ) { + return false; + } auto const theirs { material_of( *other, Kind, otherend ) }; if( theirs == null_handle || theirs == own ) { return false; @@ -220,7 +225,7 @@ blending setup( TTrack const &Track, kind const Kind ) { end_frame( Track, end, blend.point, blend.inward ); blend.point -= Track.m_origin; blend.length = Track.m_blend[ static_cast( Kind ) ][ end ]; - // where both tracks blend they meet half way at the joint, otherwise this one goes all the way to the other one there + // where both tracks blend they meet half way at the joint; a plain track goes all the way into the rails of a switch blend.peak = ( blends( *other, Kind, otherend ) ? 0.5f : 1.f ); blend.active = true; others[ end ] = theirs;