mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 15:09:19 +02:00
brake control fix, skip destructors at exit
This commit is contained in:
2
EU07.cpp
2
EU07.cpp
@@ -439,5 +439,7 @@ int main(int argc, char *argv[])
|
|||||||
glfwDestroyWindow(window);
|
glfwDestroyWindow(window);
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
|
|
||||||
|
_exit(0); // skip destructors, there are ordering errors which causes segfaults
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -831,7 +831,7 @@ void TTrain::OnCommand_trainbrakedecrease( TTrain *Train, command_data const &Co
|
|||||||
Train->mvOccupied->BrakeLevelAdd( -Global::fBrakeStep * Command.time_delta );
|
Train->mvOccupied->BrakeLevelAdd( -Global::fBrakeStep * Command.time_delta );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Train->set_train_brake( Train->mvOccupied->BrakeCtrlPos - Global::fBrakeStep * Command.time_delta );
|
Train->set_train_brake( Train->mvOccupied->fBrakeCtrlPos - Global::fBrakeStep * Command.time_delta );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Command.action == GLFW_RELEASE) {
|
else if (Command.action == GLFW_RELEASE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user