From 5aab9969ceac977460714ad833ad496e38d57708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sun, 25 Feb 2024 23:33:11 +0100 Subject: [PATCH] Fix first envelope line segment not being rendered in editor Rendering was started with the second line segment after one time step has already passed. --- src/game/editor/editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 89ec0b081..382e376cf 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -6639,9 +6639,9 @@ void CEditor::RenderEnvelopeEditor(CUIRect View) float StepSize = (EndX - StartX) / static_cast(Steps); ColorRGBA Channels = ColorRGBA(0.0f, 0.0f, 0.0f, 0.0f); - pEnvelope->Eval(StartTime + StepTime, Channels, c + 1); + pEnvelope->Eval(StartTime, Channels, c + 1); float PrevY = EnvelopeToScreenY(View, Channels[c]); - for(int i = 2; i < Steps; i++) + for(int i = 1; i < Steps; i++) { Channels = ColorRGBA(0.0f, 0.0f, 0.0f, 0.0f); pEnvelope->Eval(StartTime + i * StepTime, Channels, c + 1);