mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
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.
This commit is contained in:
parent
7c4d51f111
commit
5aab9969ce
|
@ -6639,9 +6639,9 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
|
|||
float StepSize = (EndX - StartX) / static_cast<float>(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);
|
||||
|
|
Loading…
Reference in a new issue