mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-29 05:47:28 +01:00
refactor(track): the rails of the two paths of a switch are laid by one loop for left and right switches alike, the side of the blade of a path and the blade itself come from one place, used when a switch is made, thrown and its frog found
This commit is contained in:
@@ -735,7 +735,7 @@ TTrack::switch_frog TTrack::frog() const {
|
||||
if( eType != tt_Switch || false == cut_rails( *this ) ) {
|
||||
return result;
|
||||
}
|
||||
result.side[ 0 ] = ( SwitchExtension->RightSwitch ? 1 : -1 );
|
||||
result.side[ 0 ] = blade_side( 0 );
|
||||
result.side[ 1 ] = -result.side[ 0 ];
|
||||
auto const halfwidth { 0.5 * std::abs( fTrackWidth ) };
|
||||
std::vector<glm::dvec2> lines[ 2 ];
|
||||
|
||||
Reference in New Issue
Block a user