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

Method finishAnimations

source/base/StarAnimatedPartSet.cpp:209–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209void AnimatedPartSet::finishAnimations() {
210 for (auto& pair : m_stateTypes) {
211 auto& stateType = pair.second;
212
213 while (true) {
214 auto const& state = *stateType.activeStatePointer;
215
216 if (state.animationMode == End) {
217 stateType.activeState.timer = state.cycle;
218 } else if (state.animationMode == Transition) {
219 stateType.activeState.stateName = state.transitionState;
220 stateType.activeState.timer = 0.0f;
221 stateType.activeStatePointer = stateType.states.get(state.transitionState).get();
222 continue;
223 }
224 break;
225 }
226
227 stateType.activeStateDirty = true;
228 }
229
230 for (auto& pair : m_parts)
231 pair.second.activePartDirty = true;
232}
233
234AnimatedPartSet::AnimationMode AnimatedPartSet::stringToAnimationMode(String const& string) {
235 if (string.equals("end", String::CaseInsensitive)) {

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected