mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-09 00:17:39 +01:00
fix(track): the cab keeps the shake a track doesn't replace, and the editor redraws all that an edit changes
The side sway from the lateral acceleration now goes off only on a track with a sideways value, and the random jolts on one with a vertical or a sideways value. Dips at the rail joints and cross level alone replace neither. On a switch it goes by the path set and what its joined tracks allow. An edit in the editor also rebuilds the other switches of a joined group with the tracks they meet, and the tracks of a rail run whose joints moved. Removing a track does the same. While dragging, the tracks further off wait until the drag ends. The clatter of a bogie's axles was right: the followers stand at the pivots and the offsets are the places of the wheel sets. The misleading name goes. Also what Sonar had left: a parameter as a span, a const method, a struct and its member apart, commented out code, and a function of the grading tool split, with the same output.
This commit is contained in:
@@ -442,12 +442,14 @@ void editor_mode::render_track_gizmo()
|
||||
|
||||
void editor_mode::commit_track_drag(bool const Force)
|
||||
{
|
||||
if (false == m_track_dirty || m_track_drag.empty())
|
||||
// on letting go the rest of what follows the dragged tracks is yet to come, even with all of the drag committed
|
||||
if ((false == m_track_dirty && false == (Force && m_track_drag_on_the_way)) || m_track_drag.empty())
|
||||
return;
|
||||
auto const now = std::chrono::steady_clock::now();
|
||||
if (false == Force && now - m_track_last_commit < std::chrono::milliseconds(100))
|
||||
return;
|
||||
editor_track::commit(m_track_drag);
|
||||
editor_track::commit(m_track_drag, false == Force);
|
||||
m_track_drag_on_the_way = false == Force;
|
||||
m_track_dirty = false;
|
||||
m_track_last_commit = now;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user