From 995f0f126fb52902decc6c84426ebb8a0a948ddc Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 2 May 2020 17:17:07 -0700 Subject: [PATCH] Fix 1-frame glitch when entering a room with plats in finalmode Looks like mapclass::changefinalcol() is called whenever you enter a room in Outside Dimension VVVVVV. mapclass::changefinalcol() changes the tile, but it doesn't update their drawframe. So after that function is called, update their drawframe. If you update their drawframe while inside that function, then when the platform actually cycles color it'll cycle backwards quickly sometimes, which is not ideal. --- desktop_version/src/Map.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/desktop_version/src/Map.cpp b/desktop_version/src/Map.cpp index c0da2af3..30a456a8 100644 --- a/desktop_version/src/Map.cpp +++ b/desktop_version/src/Map.cpp @@ -1383,6 +1383,14 @@ void mapclass::loadlevel(int rx, int ry) graphics.rcol = 6; changefinalcol(final_mapcol); + for (size_t i = 0; i < obj.entities.size(); i++) + { + if (obj.entities[i].type == 1 || obj.entities[i].type == 2) + { + //Fix 1-frame glitch + obj.entities[i].drawframe = obj.entities[i].tile; + } + } break; case 7: //Final Level, Tower 1 tdrawback = true;