MCPcopy Create free account
hub / github.com/ddnet/ddnet / RemoveTimeOffsetEnvelope

Method RemoveTimeOffsetEnvelope

src/game/editor/editor.cpp:4441–4448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4439}
4440
4441void CEditor::RemoveTimeOffsetEnvelope(const std::shared_ptr<CEnvelope> &pEnvelope)
4442{
4443 CFixedTime TimeOffset = pEnvelope->m_vPoints[0].m_Time;
4444 for(auto &Point : pEnvelope->m_vPoints)
4445 Point.m_Time -= TimeOffset;
4446
4447 m_OffsetEnvelopeX += TimeOffset.AsSeconds() / m_ZoomEnvelopeX.GetValue();
4448}
4449
4450static float ClampDelta(float Val, float Delta, float Min, float Max)
4451{

Callers

nothing calls this directly

Calls 2

GetValueMethod · 0.80
AsSecondsMethod · 0.45

Tested by

no test coverage detected