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

Method tickNetInterpolation

source/core/StarNetElementBasicFields.hpp:202–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200
201template <typename T>
202void NetElementBasicField<T>::tickNetInterpolation(float dt) {
203 if (m_pendingInterpolatedValues) {
204 for (auto& p : *m_pendingInterpolatedValues)
205 p.first -= dt;
206 while (!m_pendingInterpolatedValues->empty() && m_pendingInterpolatedValues->first().first <= 0.0f) {
207 m_value = m_pendingInterpolatedValues->takeFirst().second;
208 updated();
209 }
210 }
211}
212
213template <typename T>
214void NetElementBasicField<T>::netStore(DataStream& ds, NetCompatibilityRules rules) const {

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
firstMethod · 0.45
takeFirstMethod · 0.45

Tested by

no test coverage detected