From a0c572428364b50084152c3af15762c5d1ecf552 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 14 Jun 2021 11:44:00 -0700 Subject: [PATCH] Set visualonroof/visualonground to 1 on vertical platforms This fixes one of two desyncs in my Nova TAS. The problem is that by adding two frames of edge-flipping to vertically moving platforms, Viridian's framedelay is updated for one extra frame after they step off of a vertically-moving platform. This then messes up Viridian's drawframe for the rest of the TAS until they die in a drawframe-sensitive trick. The solution here is to only set the visual onroof/onground to 1 instead. The logical onroof/onground is still 2, so players still have two frames of edge-flipping off of vertically-moving platforms - it just won't really look like it (not that you could easily tell anyway). --- desktop_version/src/Entity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index b36797e7..fbefd0a4 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -4508,14 +4508,14 @@ void entityclass::movingplatformfix( int t, int j ) entities[j].yp = entities[t].yp + entities[t].h; entities[j].vy = 0; entities[j].onroof = 2; - entities[j].visualonroof = entities[j].onroof; + entities[j].visualonroof = 1; } else { entities[j].yp = entities[t].yp - entities[j].h-entities[j].cy; entities[j].vy = 0; entities[j].onground = 2; - entities[j].visualonground = entities[j].onground; + entities[j].visualonground = 1; } } else