diff --git a/rogueviz/ru/entity.cpp b/rogueviz/ru/entity.cpp index 7719643d..dfd6f57e 100644 --- a/rogueviz/ru/entity.cpp +++ b/rogueviz/ru/entity.cpp @@ -619,7 +619,7 @@ xy pendulum_platform::location_at(ld t) { auto h1 = to_hyper(a); auto h2 = to_hyper(b); auto d = hdist(h1, h2); - auto x = (1 - cos(t / game_fps * TAU / period)) / 2 * d; + auto x = (1 - cos(shift + t / game_fps * TAU / period)) / 2 * d; return from_hyper(rgpushxto0(h1) * rspintox(gpushxto0(h1) * h2) * xpush0(x)); } @@ -643,7 +643,7 @@ xy ellipse_platform::location_at(ld t) { } lengthsum.push_back(ls); } - ld our_t = t / (period * game_fps); + ld our_t = (t + shift * game_fps) / (period * game_fps); our_t -= floor(our_t); our_t *= lengthsum.back(); auto it = lower_bound(lengthsum.begin(), lengthsum.end(), our_t);