respect mcd interval

This commit is contained in:
Green Sky 2024-02-03 17:39:04 +01:00
parent 8b3af55834
commit 949929f490
No known key found for this signature in database

View File

@ -313,13 +313,17 @@ int main(int argc, char** argv) {
mc.iterate(time_delta_tick);
mcd.iterate(time_delta_tick);
const float mcd_interval = mcd.iterate(time_delta_tick);
const float tox_interval = std::pow(tc.toxIterationInterval(), 1.6f) / 1000.f;
last_min_interval = std::min<float>(
tox_interval,
pm_interval
);
last_min_interval = std::min<float>(
last_min_interval,
mcd_interval
);
// dont sleep and do an extra check