mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 14:29:42 -05:00
Prevent crash in DashboardItemInstruments when using dates before 2000 (closes #1878). Remove the padding images from New Horizons that screw up the instruments timing
This commit is contained in:
@@ -27,7 +27,7 @@ local images = asset.syncedResource({
|
||||
Name = "Pluto Images",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "newhorizons_plutoencounter_pluto_images",
|
||||
Version = 1
|
||||
Version = 2
|
||||
})
|
||||
|
||||
local plutoRadius = 1.173E6
|
||||
|
||||
@@ -131,8 +131,9 @@ void DashboardItemInstruments::render(glm::vec2& penPosition) {
|
||||
|
||||
double previous = sequencer.prevCaptureTime(currentTime);
|
||||
double next = sequencer.nextCaptureTime(currentTime);
|
||||
double remaining = sequencer.nextCaptureTime(currentTime) - currentTime;
|
||||
const float t = static_cast<float>(1.0 - remaining / (next - previous));
|
||||
double remaining = next - currentTime;
|
||||
float t = static_cast<float>(1.0 - remaining / (next - previous));
|
||||
t = std::clamp(t, 0.f, 1.f);
|
||||
|
||||
if (remaining > 0.0) {
|
||||
RenderFont(
|
||||
|
||||
Reference in New Issue
Block a user