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

Necessary fixes for wpiers switcher

This commit is contained in:
2025-03-07 02:07:08 +01:00
parent 664896275f
commit 793a6c57f0
3 changed files with 3 additions and 2 deletions

View File

@@ -2192,7 +2192,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