File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ public override void Awake()
3131
3232 public void Start ( )
3333 {
34+ if ( GameManager . main == null )
35+ {
36+ base . enabled = false ;
37+ return ;
38+ }
3439 this . Part . onPartUsed . AddListener ( this . ToggleEnabled ) ;
3540 this . _on = this . getBoolVariable ( "wheel_on" ) ;
3641 this . _traction = this . getDoubleVariable ( "traction" ) ;
Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ public override void Awake()
4040
4141 private void Start ( )
4242 {
43+ if ( GameManager . main == null )
44+ {
45+ base . enabled = false ;
46+ return ;
47+ }
4348 this . _material_container = this . GetMaterialContainer ( ) ;
4449 this . _target_state = this . getDoubleVariable ( "target_state" ) ;
4550 this . _state = this . getDoubleVariable ( "state" ) ;
Original file line number Diff line number Diff line change @@ -43,8 +43,12 @@ public override void Awake()
4343
4444 private void Start ( )
4545 {
46-
47- if ( this . _max_opening . Value > 180 )
46+ if ( GameManager . main == null )
47+ {
48+ base . enabled = false ;
49+ return ;
50+ }
51+ if ( this . _max_opening . Value > 180 )
4852 {
4953 this . _max_opening . Value = 180 ;
5054 }
You can’t perform that action at this time.
0 commit comments