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

Necessary fixes for wpiers switcher

This commit is contained in:
2025-03-07 02:07:08 +01:00
parent 87973d64fa
commit fa9eef8b69
3 changed files with 3 additions and 2 deletions

View File

@@ -2222,7 +2222,7 @@ void TTrain::OnCommand_wiperswitchincrease(TTrain *Train, command_data const &Co
if (Command.action == GLFW_PRESS)
{
Train->mvOccupied->wiperSwitchPos++;
if (Train->mvOccupied->wiperSwitchPos > Train->mvOccupied->WiperListSize)
if (Train->mvOccupied->wiperSwitchPos > Train->mvOccupied->WiperListSize - 1)
Train->mvOccupied->wiperSwitchPos = Train->mvOccupied->WiperListSize - 1;
// Visual feedback