From 15068e76ab3e7df6cee099f361fff20dbfb79d5d Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 9 Sep 2025 13:32:36 +0200 Subject: [PATCH] fixed the disconnect between Euclidean sspeed and mspeed --- animations.cpp | 2 +- hypgraph.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/animations.cpp b/animations.cpp index c5a98f0d..f161075c 100644 --- a/animations.cpp +++ b/animations.cpp @@ -158,7 +158,7 @@ EX bool applyAnimation(cell *c, shiftmatrix& V, double& footphase, int layer) { R = hdist(a.attackat * TC0, a.wherenow * TC0); else R = hdist(a.wherenow * TC0, TC0); - aspd *= (1+R+(shmup::on?1:0)); + adjust_aspeed(aspd, R); if(a.attacking == 3 && aspd > R) aspd = R; diff --git a/hypgraph.cpp b/hypgraph.cpp index cf3e97d8..b4d2a37a 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -2258,6 +2258,10 @@ EX vector move_affected_matrices(int flag) { return res; } +EX void adjust_aspeed(ld& aspd, ld R) { + aspd *= euclid ? (2+3*R*R) : (1+R+(shmup::on?1:0)); + } + EX void centerpc(ld aspd) { if(subscreens::split([=] () {centerpc(aspd);})) return; @@ -2341,7 +2345,7 @@ EX void centerpc(ld aspd) { } else { - aspd *= euclid ? (2+3*R*R) : (1+R+(shmup::on?1:0)); + adjust_aspeed(aspd, R); if(R < aspd) fix_whichcopy_if_near();