You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Source/RunActivity/Viewer3D/Sky.cs
+24-17Lines changed: 24 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -137,12 +137,10 @@ public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime)
137
137
// Current solar and lunar position are calculated by interpolation in the lookup arrays.
138
138
// The arrays have intervals of 1200 secs or 20 mins.
139
139
// Using the Lerp() function, so need to calculate the in-between differential
140
-
floatdiff=GetCelestialDiff();
141
140
// The rest of this increments/decrements the array indices and checks for overshoot/undershoot.
142
-
while(Viewer.Simulator.ClockTime>=(oldClockTime+1200))// Plus key, or normal forward in time; <CSComment> better so in case of fast forward
141
+
while(Viewer.Simulator.ClockTime>=(oldClockTime-DaylightOffsetS+1200))// Plus key, or normal forward in time; <CSComment> better so in case of fast forward
143
142
{
144
143
oldClockTime=oldClockTime+1200;
145
-
diff=GetCelestialDiff();
146
144
step1++;
147
145
step2++;
148
146
if(step2>=maxSteps)// Midnight.
@@ -154,10 +152,9 @@ public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime)
154
152
step1=0;
155
153
}
156
154
}
157
-
if(Viewer.Simulator.ClockTime<=(oldClockTime-1200))// Minus key
155
+
if(Viewer.Simulator.ClockTime<=(oldClockTime-DaylightOffsetS))// Minus key
158
156
{
159
-
oldClockTime=Viewer.Simulator.ClockTime;
160
-
diff=0;
157
+
oldClockTime=oldClockTime-1200;
161
158
step1--;
162
159
step2--;
163
160
if(step1<0)// Midnight.
@@ -169,27 +166,37 @@ public void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime)
0 commit comments