17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 00:50:29 +01:00

fix(sleepers): the fastenings of a rail part between two carved cuts where the part is laid, not twice as far out: both cuts carry its carved lines, taken once as the rails are laid, by one rule for both

This commit is contained in:
maj00r
2026-10-23 19:39:07 +02:00
parent 9478f69203
commit 153cdc550c
3 changed files with 14 additions and 8 deletions

View File

@@ -94,7 +94,7 @@ fastened_rails::fastened_rails( TTrack &Track ) {
if( to - from < fastening_merge ) {
continue;
}
auto const offsets { knots::sum( before != nullptr ? before->startoffsets : knots::line {}, after != nullptr ? after->endoffsets : knots::line {} ) };
auto const offsets { track_rails::part_offsets( before, after ) };
auto const count { std::max( 1, static_cast<int>( std::ceil( ( to - from ) / fastening_step ) ) ) };
rail line;
line.track = track;