mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Make repair button vehicle in debug mode instead call resetconsist command, add pantograph damage flag, repair pantographs in resetconsist command
This commit is contained in:
@@ -546,18 +546,10 @@ debug_panel::render() {
|
||||
// sections
|
||||
ImGui::Separator();
|
||||
if( true == render_section( "Vehicle", m_vehiclelines ) ) {
|
||||
if( ( m_input.mover )
|
||||
&& ( m_input.mover->DamageFlag != 0 ) ) {
|
||||
if( true == ImGui::Button( "Fix Status" ) ) {
|
||||
// TODO: refactor status reset into mover method
|
||||
m_input.mover->DamageFlag = 0;
|
||||
m_input.mover->EngDmgFlag = 0;
|
||||
m_input.mover->V = 0.0001; // HACK: force vehicle position re-calculation
|
||||
m_input.mover->DistCounter = 0.0;
|
||||
m_input.mover->WheelFlat = 0.0;
|
||||
m_input.mover->AlarmChainFlag = false;
|
||||
m_input.mover->OffsetTrackH = 0.0;
|
||||
m_input.mover->OffsetTrackV = 0.0;
|
||||
if( DebugModeFlag && ( m_input.mover ) && ( m_input.mover->DamageFlag != 0 ) ) {
|
||||
if( true == ImGui::Button( "Stop and repair consist" ) ) {
|
||||
command_relay relay;
|
||||
relay.post(user_command::resetconsist, 0.0, 0.0, GLFW_PRESS, 0, glm::vec3(0.0f), &m_input.vehicle->name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user