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

maintenance: event code refactoring

This commit is contained in:
tmj-fstate
2018-09-18 03:57:32 +02:00
parent 4da8b300e8
commit 40afc461fa
23 changed files with 2451 additions and 1644 deletions

View File

@@ -3729,7 +3729,7 @@ void TTrain::OnCommand_generictoggle( TTrain *Train, command_data const &Command
if( Command.action == GLFW_PRESS ) {
// only reacting to press, so the switch doesn't flip back and forth if key is held down
if( item.GetValue() < 0.25 ) {
if( item.GetDesiredValue() < 0.5 ) {
// turn on
// visual feedback
item.UpdateValue( 1.0, Train->dsbSwitch );