Fix aircraft acceleration/deceleration at high FPS

The flight model's longitudinal force/speed-command accumulator and the
accel/brake trigger command are stepped by fixed per-frame constants with no
delta, so with ac6_unlock_fps active the plane accelerates and brakes
proportionally faster at higher frame rates.

Wrap the two flight-model functions (rex_sub_823046A0 force step,
rex_sub_82329B40 input shaping) and rescale each accumulator's net per-call
change by frame_time / 33.3ms, reproducing the native 30fps continuous-time
dynamics at any frame rate. Bit-exact pass-through at <=30fps; applies to
player and AI aircraft. Gated by ac6_fps_physics_fix (default on) and only
active while the unlock's timing hooks are (ac6::TimingHooksActive).
This commit is contained in:
Dipshet
2026-07-09 22:33:39 +03:00
parent b627fc8eca
commit 175480efb7
4 changed files with 185 additions and 0 deletions
+8
View File
@@ -49,6 +49,14 @@ bool AreTimingHooksActive() {
namespace ac6 {
// True while the FPS-unlock timing hooks are remapping the game's cadence
// (unlock cvars on and no cutscene clamp). The physics force-step rescale keys
// off this so it stays in lockstep with the frame-delta hooks: whenever the
// delta reverts to vanilla, the force step must too.
bool TimingHooksActive() {
return AreTimingHooksActive();
}
bool IsCinematicActive() {
if (!REXCVAR_GET(ac6_cutscene_clamp)) {
return false;