16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 01:59:19 +02:00

brake control fix, skip destructors at exit

This commit is contained in:
milek7
2018-01-28 12:28:51 +01:00
parent 1413aae881
commit a4d235f805
2 changed files with 3 additions and 1 deletions

View File

@@ -439,5 +439,7 @@ int main(int argc, char *argv[])
glfwDestroyWindow(window);
glfwTerminate();
_exit(0); // skip destructors, there are ordering errors which causes segfaults
return 0;
}

View File

@@ -831,7 +831,7 @@ void TTrain::OnCommand_trainbrakedecrease( TTrain *Train, command_data const &Co
Train->mvOccupied->BrakeLevelAdd( -Global::fBrakeStep * Command.time_delta );
}
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) {