mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
commit
60e6b87130
|
@ -4267,8 +4267,8 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
|
||||||
{
|
{
|
||||||
if(pNewEnv->m_Channels == 4)
|
if(pNewEnv->m_Channels == 4)
|
||||||
{
|
{
|
||||||
pNewEnv->AddPoint(0, 1,1,1,1);
|
pNewEnv->AddPoint(0, f2fx(1.0f), f2fx(1.0f), f2fx(1.0f), f2fx(1.0f));
|
||||||
pNewEnv->AddPoint(1000, 1,1,1,1);
|
pNewEnv->AddPoint(1000, f2fx(1.0f), f2fx(1.0f), f2fx(1.0f), f2fx(1.0f));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -4417,7 +4417,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
|
||||||
int Time = (int)(((UI()->MouseX()-View.x)*TimeScale)*1000.0f);
|
int Time = (int)(((UI()->MouseX()-View.x)*TimeScale)*1000.0f);
|
||||||
//float env_y = (UI()->MouseY()-view.y)/TimeScale;
|
//float env_y = (UI()->MouseY()-view.y)/TimeScale;
|
||||||
float aChannels[4];
|
float aChannels[4];
|
||||||
pEnvelope->Eval(Time, aChannels);
|
pEnvelope->Eval(Time / 1000.0f, aChannels);
|
||||||
pEnvelope->AddPoint(Time,
|
pEnvelope->AddPoint(Time,
|
||||||
f2fx(aChannels[0]), f2fx(aChannels[1]),
|
f2fx(aChannels[0]), f2fx(aChannels[1]),
|
||||||
f2fx(aChannels[2]), f2fx(aChannels[3]));
|
f2fx(aChannels[2]), f2fx(aChannels[3]));
|
||||||
|
|
Loading…
Reference in a new issue