File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Source/RunActivity/Viewer3D Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -172,12 +172,15 @@ public void Update()
172172 BailOff . IsDown = Percentage ( readBuffer [ 5 ] , calOff , calOn ) > 50 ;
173173 Wipers . Value = ( int ) ( .01 * Percentage ( readBuffer [ 6 ] , wipers ) + 2.5 ) == 1 ? 0 : 1 ;
174174 Lights . Value = ( int ) ( .01 * Percentage ( readBuffer [ 7 ] , headlight ) + 2.5 ) ;
175-
176- foreach ( var buttonList in Commands . Values )
175+ }
176+ foreach ( var command in Commands . Keys )
177+ {
178+ var buttonList = Commands [ command ] ;
179+ foreach ( var button in buttonList )
177180 {
178- foreach ( var button in buttonList )
181+ if ( button is RailDriverButton rd && ( Active || command == UserCommand . GameExternalCabController ) )
179182 {
180- if ( button is RailDriverButton rd ) rd . Update ( readBuffer ) ;
183+ rd . Update ( readBuffer ) ;
181184 }
182185 }
183186 }
You can’t perform that action at this time.
0 commit comments