1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-28 15:38:30 +02:00
VVVVVV/desktop_version/src
Misa a7ae3e0fb0 Remove scmmoveme
So, I ended up breaking supercrewmate spawning with that roomchange
refactor. However, upon investigating how to fix it, I was running into
a weird interpolation issue due to scmmoveme, as well as the companion
spawning in the ground in "Very Good". And I was wondering why I or no
one else ended up running into them.

Well, as it turns out, scmmoveme ends up doing absolutely nothing. There
are only two instances where scmmoveme is used. The first is if you
respawn in "Very Good", and somehow have your scmprogress set to that
room. But that's impossible, because whenever you respawn, your
scmprogress is always set to the one after the room you respawn in. Even
if you respawned in the room previous to "Very Good" (which is "Don't
Get Ahead of Yourself!"), it still wouldn't work, since the logic always
kicks in when a gotoroom happens, and not only when a supercrewmate is
actually spawned. Since the scmprogress doesn't match, that case never
gets triggered, and we get to the second time scmmoveme is used, which
is in the catch-all case that always executes.

This second instance... also does nothing, because since we just
respawned, and our scmprogress got set to the room ahead of us, there is
no supercrewmate on screen. Then getscm() returns 0, and the player is
always indice 0, so the only thing we end up doing is setting the
player's x-position to their own x-position. Brilliant.

Anyway, this code results in interpolation issues and the supercrewmate
spawning in the ground on "Very Good" if you die, when my fix is
applied, because my fix moves this logic around to a different frame
order, and that actually ends up making scmmoveme no longer dead code.

So to recap: we have dead code, which looks like it does something, but
doesn't. But if you move it around in a certain way, it ends up having
harmful effects. One of the joys of working on this game...

It's also hilarious that it gets saved to the save file. Why? The only
time this variable is true, it is for literally less than a frame,
because it always gets set to false, because you always respawn using a
gotoroom whenever the supercrewmate dies, because you never respawn in
the same room as a supercrewmate, because Intermission 1 was
deliberately designed that way (else you'd keep continually dying since
the supercrewmate wouldn't move out of the way).
2021-09-11 22:23:47 -07:00
..
BinaryBlob.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
BinaryBlob.h Untabify every single file 2021-09-06 18:56:39 -07:00
BlockV.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
BlockV.h Remove unused x and y attributes of blockclass 2021-02-27 18:27:28 -05:00
Credits.h Move Misa to C++ credits 2021-08-31 23:22:22 -07:00
CustomLevels.cpp Fix platv values outside map size being saved as 67372036 2021-09-10 16:58:53 -07:00
CustomLevels.h Use const std::string& where possible in function params 2021-09-06 15:43:59 -07:00
DeferCallbacks.c Add deferred callbacks to game loop 2021-03-21 02:55:42 -04:00
DeferCallbacks.h Add deferred callbacks to game loop 2021-03-21 02:55:42 -04:00
Editor.cpp Remove unused or useless SDL_Rects from Graphics 2021-09-11 02:24:55 -07:00
Editor.h Use const std::string& where possible in function params 2021-09-06 15:43:59 -07:00
Ent.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
Ent.h Untabify every single file 2021-09-06 18:56:39 -07:00
Entity.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
Entity.h Refactor colors in internal commands 2021-08-31 15:09:51 -07:00
Enums.h Untabify every single file 2021-09-06 18:56:39 -07:00
Exit.h Add VVV_exit() 2021-02-15 23:07:35 -05:00
FileSystemUtils.cpp Fix unused variable warning on non-Emscripten 2021-09-08 11:43:23 -07:00
FileSystemUtils.h Call FS.syncfs on Emscripten (#838) 2021-09-02 13:19:51 -04:00
Finalclass.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
Finalclass.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
Game.cpp Remove scmmoveme 2021-09-11 22:23:47 -07:00
Game.h Remove scmmoveme 2021-09-11 22:23:47 -07:00
GlitchrunnerMode.c Split glitchrunner mode into multiple versions 2021-08-05 13:35:21 -04:00
GlitchrunnerMode.h Split glitchrunner mode into multiple versions 2021-08-05 13:35:21 -04:00
GOGNetwork.c Untabify every single file 2021-09-06 18:56:39 -07:00
Graphics.cpp Remove unused or useless SDL_Rects from Graphics 2021-09-11 02:24:55 -07:00
Graphics.h Remove unused or useless SDL_Rects from Graphics 2021-09-11 02:24:55 -07:00
GraphicsResources.cpp Fix surface color masks 2021-09-06 20:12:48 -07:00
GraphicsResources.h Consistently use angle brackets for SDL.h includes 2020-07-19 21:37:40 -04:00
GraphicsUtil.cpp Use SDL_BlitScaled in ScaleSurface 2021-09-05 20:07:18 -07:00
GraphicsUtil.h Add ClearSurface() 2021-02-25 19:38:25 -05:00
Input.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
Input.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
KeyPoll.cpp Handle lost focus on Emscripten 2021-09-07 09:43:48 -07:00
KeyPoll.h Untabify every single file 2021-09-06 18:56:39 -07:00
Labclass.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
Labclass.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
Logic.cpp Remove scmmoveme 2021-09-11 22:23:47 -07:00
Logic.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
main.cpp Split Func_input and Func_delta when unfocused 2021-09-07 09:43:48 -07:00
MakeAndPlay.h Use multiline comments in C files 2021-04-17 00:50:04 -04:00
Map.cpp Remove scmmoveme 2021-09-11 22:23:47 -07:00
Map.h Allow custom levels to use 2 billion tile numbers once again 2021-08-22 21:30:53 -07:00
Maths.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Music.cpp Music: Do not do fades if not playing 2021-09-10 19:37:33 -07:00
Music.h Move Mix_PausedMusic() call into wrapper function 2021-09-10 19:37:31 -07:00
Network.c Untabify every single file 2021-09-06 18:56:39 -07:00
Network.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Otherlevel.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
Otherlevel.h Set Secret Lab/Super Gravitron hidden names 2021-08-22 20:33:03 -07:00
preloader.cpp Axe RGBflip() in favor of getRGB() 2021-09-11 02:15:20 -07:00
preloader.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Render.cpp Remove useless arguments from drawimagecol() 2021-09-11 02:12:03 -07:00
Render.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
RenderFixed.cpp Use resumegamemode to track menu animation 2021-09-05 16:59:05 -07:00
RenderFixed.h Remove now-unneeded deltaframe fix when going to in-game settings 2021-03-21 02:55:42 -04:00
Screen.cpp Fix surface color masks 2021-09-06 20:12:48 -07:00
Screen.h Untabify every single file 2021-09-06 18:56:39 -07:00
ScreenSettings.h Untabify every single file 2021-09-06 18:56:39 -07:00
Script.cpp Remove scmmoveme 2021-09-11 22:23:47 -07:00
Script.h createentity command: Actually have p1/p2/p3/p4 defaults 2021-08-12 00:20:40 -04:00
Scripts.cpp Add message when player is kicked out of Super Gravitron 2021-09-03 12:08:31 -07:00
SoundSystem.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
SoundSystem.h Untabify every single file 2021-09-06 18:56:39 -07:00
Spacestation2.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
Spacestation2.h Untabify every single file 2021-09-06 18:56:39 -07:00
SteamNetwork.c Untabify every single file 2021-09-06 18:56:39 -07:00
TerminalScripts.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
Textbox.cpp Use const std::string& where possible in function params 2021-09-06 15:43:59 -07:00
Textbox.h Use const std::string& where possible in function params 2021-09-06 15:43:59 -07:00
ThirdPartyDeps.c Use multiline comments in C files 2021-04-17 00:50:04 -04:00
Tower.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
Tower.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
TowerBG.h Untabify every single file 2021-09-06 18:56:39 -07:00
Unused.h Factor out UNUSED macro to header file 2021-05-25 15:23:34 -04:00
UtilityClass.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
UtilityClass.h Replace all print calls with vlog calls 2021-09-01 14:34:55 -07:00
Version.h Don't recompile all files when the commit hash is changed 2020-12-25 20:17:01 -05:00
Version.h.in Don't recompile all files when the commit hash is changed 2020-12-25 20:17:01 -05:00
Vlogging.c Add debug logs 2021-09-01 14:34:55 -07:00
Vlogging.h Add debug logs 2021-09-01 14:34:55 -07:00
WarpClass.cpp Untabify every single file 2021-09-06 18:56:39 -07:00
WarpClass.h Untabify every single file 2021-09-06 18:56:39 -07:00
XMLUtils.cpp Move all settings to settings.vvv 2020-11-04 12:06:57 -05:00
XMLUtils.h Move all settings to settings.vvv 2020-11-04 12:06:57 -05:00
Xoshiro.c Replace Gravitron RNG with seeded Xoshiro 2021-08-27 12:28:35 -07:00
Xoshiro.h Replace Gravitron RNG with seeded Xoshiro 2021-08-27 12:28:35 -07:00