Merge pull request #339 from H-M-H/EnvelopesFix

fixed Envelopes-Bugs
This commit is contained in:
H-M-H 2015-10-07 21:55:17 +02:00
commit 60e6b87130

View file

@ -4267,8 +4267,8 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
{
if(pNewEnv->m_Channels == 4)
{
pNewEnv->AddPoint(0, 1,1,1,1);
pNewEnv->AddPoint(1000, 1,1,1,1);
pNewEnv->AddPoint(0, f2fx(1.0f), f2fx(1.0f), f2fx(1.0f), f2fx(1.0f));
pNewEnv->AddPoint(1000, f2fx(1.0f), f2fx(1.0f), f2fx(1.0f), f2fx(1.0f));
}
else
{
@ -4417,7 +4417,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
int Time = (int)(((UI()->MouseX()-View.x)*TimeScale)*1000.0f);
//float env_y = (UI()->MouseY()-view.y)/TimeScale;
float aChannels[4];
pEnvelope->Eval(Time, aChannels);
pEnvelope->Eval(Time / 1000.0f, aChannels);
pEnvelope->AddPoint(Time,
f2fx(aChannels[0]), f2fx(aChannels[1]),
f2fx(aChannels[2]), f2fx(aChannels[3]));