mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-06-18 18:56:36 +02:00
change time factor behaviour to allow editing
This commit is contained in:
@ -95,9 +95,8 @@ void OrganizerSceneService::sceneFixedUpdate(Engine&) {
|
||||
|
||||
size_t continuous_counter = 0;
|
||||
|
||||
auto& time_ctx = _scene->ctx_or_set<MM::Components::TimeDelta>(f_delta, delta_factor);
|
||||
time_ctx.tickDelta = f_delta * delta_factor;
|
||||
time_ctx.deltaFactor = delta_factor;
|
||||
auto& time_ctx = _scene->ctx_or_set<MM::Components::TimeDelta>(f_delta, initial_delta_factor);
|
||||
time_ctx.tickDelta = f_delta * time_ctx.deltaFactor;
|
||||
|
||||
// TODO: this while is just cancer
|
||||
while (_accumulator >= static_cast<decltype(_accumulator)>(dt)){
|
||||
|
@ -21,7 +21,7 @@ namespace MM::Services {
|
||||
public:
|
||||
const float f_delta;
|
||||
|
||||
float delta_factor = 1.f;
|
||||
float initial_delta_factor = 1.f;
|
||||
|
||||
public: // service
|
||||
explicit OrganizerSceneService(const float update_delta = 1.f/60.f) : f_delta(update_delta) {}
|
||||
|
Reference in New Issue
Block a user