MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / readNetDelta

Method readNetDelta

source/core/StarNetElementFloatFields.hpp:168–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166
167template <typename T>
168void NetElementFloating<T>::readNetDelta(DataStream& ds, float interpolationTime, NetCompatibilityRules rules) {
169 _unused(rules);
170 T t = readValue(ds);
171
172 m_latestUpdateVersion = m_netVersion ? m_netVersion->current() : 0;
173 if (m_interpolationDataPoints) {
174 if (interpolationTime < m_interpolationDataPoints->last().first)
175 m_interpolationDataPoints->clear();
176 m_interpolationDataPoints->append({interpolationTime, t});
177 m_value = interpolate();
178 } else {
179 m_value = t;
180 }
181}
182
183template <typename T>
184void NetElementFloating<T>::blankNetDelta(float interpolationTime) {

Callers

nothing calls this directly

Calls 4

currentMethod · 0.45
lastMethod · 0.45
clearMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected