File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed
Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 11/*****************************************************************************
22 * The MIT License (MIT)
33 *
4- * Copyright (c) 2016-2019 MOARdV
4+ * Copyright (c) 2016-2020 MOARdV
55 *
66 * Permission is hereby granted, free of charge, to any person obtaining a copy
77 * of this software and associated documentation files (the "Software"), to
@@ -130,6 +130,8 @@ public override void OnLoad(ConfigNode node)
130130 {
131131 navigation . DMEPropagation = 1.4f ;
132132 }
133+
134+ MASLoader . UpdateHorizonDistance ( ) ;
133135 }
134136
135137 /// <summary>
Original file line number Diff line number Diff line change @@ -175,6 +175,19 @@ internal static Font GetFont(string fontName)
175175 }
176176 }
177177
178+ /// <summary>
179+ /// Convenience function to update navaid horizon distances when propagation
180+ /// values change.
181+ /// </summary>
182+ static public void UpdateHorizonDistance ( )
183+ {
184+ int numNavAids = navaids . Count ;
185+ for ( int i = 0 ; i < numNavAids ; ++ i )
186+ {
187+ navaids [ i ] . UpdateHorizonDistance ( ) ;
188+ }
189+ }
190+
178191 /// <summary>
179192 /// Awake() - Load components used by the mod.
180193 /// </summary>
Original file line number Diff line number Diff line change 11/*****************************************************************************
22 * The MIT License (MIT)
33 *
4- * Copyright (c) 2017-2019 MOARdV
4+ * Copyright (c) 2017-2020 MOARdV
55 *
66 * Permission is hereby granted, free of charge, to any person obtaining a copy
77 * of this software and associated documentation files (the "Software"), to
@@ -198,11 +198,7 @@ private void ApplyChanges()
198198 MASConfig . navigation . VORPropagation = VORPropagation ;
199199 MASConfig . navigation . DMEPropagation = DMEPropagation ;
200200
201- int numNavAids = MASLoader . navaids . Count ;
202- for ( int i = 0 ; i < numNavAids ; ++ i )
203- {
204- MASLoader . navaids [ i ] . UpdateHorizonDistance ( ) ;
205- }
201+ MASLoader . UpdateHorizonDistance ( ) ;
206202 }
207203
208204 private void onAppLauncherShow ( )
You can’t perform that action at this time.
0 commit comments