From caf7abebfe784a94fbc0e6b51e49cfeab91bf96a Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 11 Mar 2024 16:31:20 +1100 Subject: change tickNetInterpolation calls to use dt value --- source/core/StarNetElementGroup.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/core/StarNetElementGroup.cpp') diff --git a/source/core/StarNetElementGroup.cpp b/source/core/StarNetElementGroup.cpp index d8ff6c4..249c978 100644 --- a/source/core/StarNetElementGroup.cpp +++ b/source/core/StarNetElementGroup.cpp @@ -17,24 +17,24 @@ void NetElementGroup::clearNetElements() { void NetElementGroup::initNetVersion(NetElementVersion const* version) { m_version = version; - for (auto p : m_elements) + for (auto& p : m_elements) p.first->initNetVersion(m_version); } void NetElementGroup::netStore(DataStream& ds) const { - for (auto p : m_elements) + for (auto& p : m_elements) p.first->netStore(ds); } void NetElementGroup::netLoad(DataStream& ds) { - for (auto p : m_elements) + for (auto& p : m_elements) p.first->netLoad(ds); } void NetElementGroup::enableNetInterpolation(float extrapolationHint) { m_interpolationEnabled = true; m_extrapolationHint = extrapolationHint; - for (auto p : m_elements) { + for (auto& p : m_elements) { if (p.second) p.first->enableNetInterpolation(extrapolationHint); } @@ -43,7 +43,7 @@ void NetElementGroup::enableNetInterpolation(float extrapolationHint) { void NetElementGroup::disableNetInterpolation() { m_interpolationEnabled = false; m_extrapolationHint = 0; - for (auto p : m_elements) { + for (auto& p : m_elements) { if (p.second) p.first->disableNetInterpolation(); } @@ -51,7 +51,7 @@ void NetElementGroup::disableNetInterpolation() { void NetElementGroup::tickNetInterpolation(float dt) { if (m_interpolationEnabled) { - for (auto p : m_elements) + for (auto& p : m_elements) p.first->tickNetInterpolation(dt); } } @@ -100,7 +100,7 @@ void NetElementGroup::readNetDelta(DataStream& ds, float interpolationTime) { void NetElementGroup::blankNetDelta(float interpolationTime) { if (m_interpolationEnabled) { - for (auto p : m_elements) + for (auto& p : m_elements) p.first->blankNetDelta(interpolationTime); } } -- cgit v1.2.3