MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / variableUpdate

Function variableUpdate

src/OpenLoco/src/OpenLoco.cpp:669–688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

667 constexpr auto TimeScale = 1.0;
668
669 static void variableUpdate()
670 {
671 auto& tweener = EntityTweener::get();
672
673 const auto alpha = std::min<float>(_accumulator / UpdateTime, 1.0);
674
675 while (_accumulator > UpdateTime)
676 {
677 tweener.preTick();
678
679 tick();
680 _accumulator -= UpdateTime;
681
682 tweener.postTick();
683 }
684
685 tweener.tween(alpha);
686
687 Ui::render();
688 }
689
690 static void fixedUpdate()
691 {

Callers 1

updateFunction · 0.85

Calls 6

preTickMethod · 0.80
postTickMethod · 0.80
tweenMethod · 0.80
getFunction · 0.70
tickFunction · 0.70
renderFunction · 0.70

Tested by

no test coverage detected